fixed timezone correction

marcick

Well-Known Member
Licensed User
Longtime User
I need to convert a date coming from a GPS to a date with fixed timezone (always +1 regardless where I'm in the world).
Also daylight correction must be included.
So, I have to add 1 hour during winter and 2 during summer.
I spent one hour to read posts and posts, but now I'm here ....
Marco
 

marcick

Well-Known Member
Licensed User
Longtime User
GPS date is GMT+0 and does not consider daylight saving.
I want to correct it not with my time zone and DST but with any time zone and DST.
23 November 2011 15:00:00 GMT0, what date is at GMT+5 considering daylight saving also ?
 
Upvote 0

Brendon

Member
Licensed User
Longtime User
You can set DateTime.DateFormat to your format coming form gps. Then you can use DateTime.DateParse to obtain a long value representing your date and time, and then use DateTime.Add function to correct your date according to time zone and DST
 
Upvote 0

marcick

Well-Known Member
Licensed User
Longtime User
Thank you for your help, but this is what I'm actually doing ...

My doubt is this : suppose I want to correct the date for +5 time zone. I can add 5 x 3600000 thicks. But what about DST ? I don't know if at +5 they have DST or not. How do I have to consider DST in my code ?
 
Upvote 0
Top