3 ms·
It should be possible in most practical situations. This is assuming you are storing the timezone correctly. You can always look at the date component of the ti
by koliber 7y ago
It should be possible in most practical situations. This is assuming you are storing the timezone correctly. You can always look at the date component of the timezone, look it up in a DB like the Olson DB to see what the UTC offset was on that date, and then apply that offset to get the datetime in UTC.
There are a few relatively small periods in time when that mapping is not one-to-one. Then it is not possible without additional information.
That being said, do everyone a solid and store your date times in the DB in UTC, in a field type that explicitly supports date times with timezones.
- jsjohnst 7y ago> field type that explicitly supports date times with timezones So as a string then in MySQL? ;)