tagged [utc]
How do I get a UTC Timestamp in JavaScript?
How do I get a UTC Timestamp in JavaScript? While writing a web application, it makes sense to store (server side) datetimes in the DB as UTC timestamps. I was astonished when I noticed that you could...
- Modified
- 30 Aug at 18:59
Converting datetime.date to UTC timestamp in Python
Converting datetime.date to UTC timestamp in Python I am dealing with dates in Python and I need to convert them to UTC timestamps to be used inside Javascript. The following code does not work: Conve...
JSON Stringify changes time of date because of UTC
JSON Stringify changes time of date because of UTC My date objects in JavaScript are always represented by UTC +2 because of where I am located. Hence like this Problem is doing a `JSON.stringify` con...
- Modified
- 3 Dec at 10:41
Convert UTC Epoch to local date
Convert UTC Epoch to local date I have been fighting with this for a bit now. I’m trying to convert epoch to a date object. The epoch is sent to me in UTC. Whenever you pass `new Date()` an epoch, it ...
- Modified
- 24 Oct at 10:23
Daylight saving time and time zone best practices
Daylight saving time and time zone best practices I am hoping to make this question and the answers to it the definitive guide to dealing with daylight saving time, in particular for dealing with the ...
- Modified
- 25 Jul at 21:47
Convert UTC/GMT time to local time
Convert UTC/GMT time to local time We are developing a C# application for a web-service client. This will run on Windows XP PC's. One of the fields returned by the web service is a DateTime field. The...
Are .Net's DateTime methods capable of recognising a Leap Second?
Are .Net's DateTime methods capable of recognising a Leap Second? With a [Leap Second on the horizon for June this year](ftp://hpiers.obspm.fr/iers/bul/bulc/bulletinc.dat) it got me wondering whether ...
Is there an OrmLite option for DateTime.SpecifyKind(DateTimeKind.Utc)?
Is there an OrmLite option for DateTime.SpecifyKind(DateTimeKind.Utc)? Is there a way to specify that I want of the `DateTime`s that OrmLite materializes to be set to UTC kind? I store a lot of `DateT...
- Modified
- 23 May at 12:6
Get current date time from server and convert it into local time in c#
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 to get current date and t...
Globally convert UTC DateTimes to user specified local DateTimes
Globally convert UTC DateTimes to user specified local DateTimes I am storing all the DateTime fields as UTC time. When a user requests a web page, I would like to take his preferred local timezone (a...
How to convert DateTime in Specific timezone?
How to convert DateTime in Specific timezone? I find it hard to understand how UTC works. I have to do the following but I'm still confused if I'd get the right result. Objectives: 1. Ensure all sa...
Storing date/times as UTC in database
Storing date/times as UTC in database I am storing date/times in the database as UTC and computing them inside my application back to local time based on the specific timezone. Say for example I have ...
How can I determine a timezone by the UTC offset?
How can I determine a timezone by the UTC offset? I have a scenario where I have a timezone offset (in minutes) and need to determine the timezone for it. I know that all the data is not available (fo...
- Modified
- 14 Aug at 12:32
Where's the DateTime 'Z' format specifier?
Where's the DateTime 'Z' format specifier? [: ] I've been trying to perform roundtrip DateTime conversions with a format string that uses 'zzz' format specifier, which I know is bound to local time. S...
Issue around utc date - TimeZoneInfo.ConvertTimeToUtc results in date change
Issue around utc date - TimeZoneInfo.ConvertTimeToUtc results in date change Having an issue whereby the date I wish to save is changing from the onscreen selected date if the users selects a timezone...
Timezone Strategy
Timezone Strategy I am building a MVC 3 application where the users may not be in the same time zone, so my intent was to store everything in UTC and convert from UTC to local time in the views and lo...
- Modified
- 14 Jan at 18:5
How to convert a date to UTC properly and then convert it back?
How to convert a date to UTC properly and then convert it back? I'm struggling with converting DateTime to UTC, the concept and all, something I'm not understanding correctly. When I get a date time s...