You need to store the timezone as an extra column in DB. I do not know any DB that stores datetime with timezone/offset.
Or store the date as string in ISO 8601 format with offset..
Edit: I stand somewhat corrected, with some newer databases it is possible!
- Postgresql Date/Time Types, which indeed may include timezone.
- Datatype: "timestamp [ (p) ] with time zone" only for input and output, it is stored in UTC.
- Datatype: "time with time zone", only time, stores timezone offset. Since version 8.
- ORACLE Datetime Datatypes and Time Zone Support.
- Datatype: "TIMESTAMP WITH TIME ZONE", stores timezone offset. Since version 9i.
- Datatype: "TIMESTAMP WITH TIME ZONE", stores timezone offset or timezone name. Since version 10g.
- See also Oracle TIMESTAMP WITH TIMEZONE named zone vs offset.
- MicroSoft SQL Server 2008
- Datatype: "datetimeoffset", stores timezone offset.
- Sybase
- Datatype: "TIMESTAMP WITH TIME ZONE", stores timezone offset.
- Support for TIMESTAMP WITH TIME ZONE is optional SQL language feature F411 of the SQL/2008 standard.
Seems to actually be somewhat standard SQL99.
Not for Mysql. Version 5.6.
- Nor for SQLite. Version 3.
I do find consolation in the fact that the correction came from myself ;-)