Top "Timezone" questions

A time zone is a region on Earth that has a uniform, legally mandated standard time.

How to use TimeZoneInfo to get local time during Daylight Saving Time?

I'm trying to use DateTimeOffset to convey a specific moment in time across any time zone. I can't figure out …

c# datetimeoffset timezone
Getting the correct timezone offset in Python using local timezone

Ok let me first start by saying my timezone is CET/CEST. The exact moment it changes from CEST to …

python timezone pytz timezone-offset
How to elegantly deal with timezones

I have a website that is hosted in a different timezone than the users using the application. In addition to …

c# .net asp.net-mvc asp.net-mvc-3 timezone
Convert UTC DateTime to another Time Zone

I have a UTC DateTime value coming from a database record. I also have a user-specified time zone (an instance …

c# datetime timezone dst
How do I get the UTC time of "midnight" for a given timezone?

The best I can come up with for now is this monstrosity: >>> datetime.utcnow() \ ... .replace(tzinfo=pytz.…

python datetime timezone utc pytz
Is it always a good idea to store time in UTC or is this the case where storing in local time is better?

Generally, it is the best practice to store time in UTC and as mentioned in here and here. Suppose there …

date time timezone utc dst
Detect timezone abbreviation using JavaScript

I need a way to detect the timezone of a given date object. I do NOT want the offset, nor …

javascript date timezone
Difference between UTC and GMT Standard Time in .NET

In .NET, the following statements return different values: Response.Write( TimeZoneInfo.ConvertTime( DateTime.Parse("2010-07-01 5:30:00.000"), TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard …

.net timezone utc gmt
pytz and astimezone() cannot be applied to a naive datetime

I have a date and I need to make it time zone aware. local_tz = timezone('Asia/Tokyo') start_date = …

python datetime timezone pytz
Get current date time from server and convert it into local time in c#

Help: I have a server which is having time in GMT-07.00 hours. My local time is GMT+05.30 hours. I need …

c# datetime timezone utc localtime