tagged [timezone]
Convert UTC DateTime to another Time Zone
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 of TimeZoneInfo). How do I convert that UTC Dat...
How to convert datetime to timestamp using C#/.NET (ignoring current timezone)
How to convert datetime to timestamp using C#/.NET (ignoring current timezone) How do I convert datetime to timestamp using C# .NET (ignoring the current timezone)? I am using the below code: But it r...
How to set time zone of a java.util.Date?
How to set time zone of a java.util.Date? I have parsed a `java.util.Date` from a `String` but it is setting the local time zone as the time zone of the `date` object. The time zone is not specified i...
- Modified
- 30 Jun at 17:1
How to convert Long type datetime to DateTime with correct time zone
How to convert Long type datetime to DateTime with correct time zone For example `1297380023295` should be 2010/2/11 9 AM I use this code right now The result of this function
How do I get the current time zone of MySQL?
How do I get the current time zone of MySQL? Anyone knows if there is such a function in MySQL? This doesn't output any valid info: ``` mysql> SELECT @@global.time_zone, @@session.time_zone; +--------...
What is the best way to store timezone information in my DB?
What is the best way to store timezone information in my DB? I have a asp.net-mvc web site that i took over and there is a page page where people enter information and times (including local timezone)...
- Modified
- 20 Jul at 13:37
Getting system Timezones in different languages
Getting system Timezones in different languages I'm currently getting the list of all timezones like this: So for instance, the timezone in Paris has a `DisplayName` property of `W. Europe Standard Ti...
Get timezone from DateTime
Get timezone from DateTime Does the .Net DateTime contain information about time zone where it was created? I have a library parsing DateTime from a format that has "+zz" at the end, and while it pars...
Get TimeZone offset value from TimeZone without TimeZone name
Get TimeZone offset value from TimeZone without TimeZone name I need to save the phone's timezone in the format [+/-]hh:mm I am using TimeZone class to deal with this, but the only format I can get is...
Get the default timezone for a country (via CultureInfo)
Get the default timezone for a country (via CultureInfo) Is there a program or a table that provides the default timezone for every country? Yes, the US, Canada, & Russia have multiple timezones. (I t...
Java SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'") gives timezone as IST
Java SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'") gives timezone as IST I have SimpleDateFormat constructor as and I am parsing string `"2013-09-29T18:46:19Z".` I have read that here Z represents the ...
- Modified
- 1 Oct at 09:19
.NET TimeZoneInfo from Olson time zone
.NET TimeZoneInfo from Olson time zone How can I convert the following into a System.TimeZone or System.TimeZoneInfo? This is data I'm getting back from a 3rd party web service. I'm assuming the offse...
What is the best way to get a formatted string to represent UTC offset?
What is the best way to get a formatted string to represent UTC offset? I need to format a date like so: 20110202192008-0500. The following code does the trick but I was wondering if there is a better...
- Modified
- 2 Feb at 20:5
Convert datetime without timezone
Convert datetime without timezone I have date in string: "2013-07-22T08:51:38.000-07:00" When I [try parse](http://msdn.microsoft.com/en-us/library/ch92fbc1.aspx) this string, I receive date with offs...
What is the difference between UTC and GMT?
What is the difference between UTC and GMT? I have a few queries regarding the Time zones: 1. Can the time be captured in UTC alone? 2. Is UTC -6 and GMT -6 the same, and does that mean it is US local...
How to get the client timezone id for c# timezoneinfo class from client side using javascript
How to get the client timezone id for c# timezoneinfo class from client side using javascript I want to get client timezone id from JavaScript to parse c# TimezoneInfo class.And Convert to utc time.An...
- Modified
- 3 Mar at 04:22
set global timezone in .net core
set global timezone in .net core In .Net Core 2 - Is there a way to set the application's timezone globally so that whenever I request for `DateTime.Now` I'll get the current time for a timezone I wan...
- Modified
- 21 Feb at 02:13
Format String to Datetime with Timezone
Format String to Datetime with Timezone I have a `string s = "May 16, 2010 7:20:12 AM CDT` that i want to convert into a DateTime object. In the code below i get a Date format cannot be converted erro...
TimeZoneInfo from timezone minutes offset
TimeZoneInfo from timezone minutes offset From JavaScript I have passed, to the controller, the number of minutes that the user's client date time is offset from UTC using the method `getTimezoneOffse...
- Modified
- 24 Sep at 15:18
TimeZoneInfo in .NET Core when hosting on unix (nginx)
TimeZoneInfo in .NET Core when hosting on unix (nginx) For example, when I try to do the following. I get the error, that the `TimeZone` is not available on the local computer. When I run this locally...
How to set a time zone (or a Kind) of a DateTime value?
How to set a time zone (or a Kind) of a DateTime value? I mean to store strict UTC time in a DateTime variable and output it in ISO 8601 format. To do the last I've used `.ToString("yyyy-MM-ddTHH:mm:s...
DateTime vs DateTimeOffset
DateTime vs DateTimeOffset What is the difference between a `DateTime` and a `DateTimeOffset` and when should one be used? --- Currently, we have a standard way of dealing with .NET `DateTime`s in a T...
- Modified
- 21 Feb at 15:28
How to convert time between timezones (UTC to EDT)?
How to convert time between timezones (UTC to EDT)? I need to have a common function to convert UTC time to EDT. I have a server in India. An application in it needs to use EDT time for all time purpo...
DateTime parsing error: The supplied DateTime represents an invalid time
DateTime parsing error: The supplied DateTime represents an invalid time I have one situation where date is `"3/13/2016 2:41:00 AM"`. When I convert date by time-zone, I get an error. ``` DateTime dt ...