I now have server local time and a hour shift to UTC(say +5, -8, etc), how can I recover it to UTC?
Note that it's not as intuitive as it is because of summer time. Currently I am in EDT, which should be UTC+5, but in fact, in summer, we only +4. And unfortunately I don't (want to) know the timezone of the server so I am not sure whether it's possible to calculate the UTC with given info.
My target language is python, but if an solution exists, the language itself shouldn't be a big problem.
Why I have such restriction, is because of this. It just doesn't return a good text timezone description instead of a number.
following is a real element in practice from my server:
<RegionalSettings>
<Language>1033</Language>
<Locale>1033</Locale>
<AdvanceHijri>0</AdvanceHijri>
<CalendarType>1</CalendarType>
<Time24>False</Time24>
<TimeZone>300</TimeZone>
<SortOrder>2070</SortOrder>
<Presence>True</Presence>
</RegionalSettings>
notice here the timezone field
<TimeZone>300</TimeZone>
it's in minutes, so it tells me I am somewhere in UTC+5, but not a honest timeshift to UTC.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire