timezone

How to calculate the local datetime from a utc datetime in tsql (sql 2005)?

Hi, i want to loop over a period of time in tsql, and print the utc datetimes and our local variant. We live in UTC +1, so i could easily add 1 hour, but in the summertime we live in UTC +2. In C# i can create a datetime and use a method to ask for the UTC variant and vice versa. Till now i have this: declare @counter int declare @l...

TimeZoneInfo.Local on XP

I have code like this which runs fine on windows 7... TimeZoneInfo _timeZoneInfo = TimeZoneInfo.Local; It doesn't work on XP SP3. The error given is... A first chance exception of type 'System.EntryPointNotFoundException' occurred in System.Core.dll Additional information: Unable to find an entry point named 'GetDynam...

How to change the timezone setting of Windows2k8 with .net

I have tried to change the timezone of my system with c# code for a few days now and nothing I'm trying is making much sense or working at all. I started out trying to use the PInvoke syntax for SetTimeZoneInformation that I've seen on other questions here. [DllImport("kernel32.dll", CharSet = CharSet.Auto)] private static extern bool ...

Xml Schemas and Date Times

I'm beginning a new project which involves heavy xml and schema use accross multiple platforms (windows, windows mobile, Iphone, Ipad, and more which are yet to be discovered!). This xml platform has to be able to exchange date times from all over the world as our product is currently being implemented in Australia as well as in Canada ...

Time zone problem in Codeigniter

I have set the default time zone like date_default_timezone_set('America/New_York'); But the time is exactly 4 hrs advance. (ie) if Current time is 6:00:00 then its saving as 10:00:00 Don't know whats wrong. Its working perfectly in localhost but not in godaddy server. ...

Parameterizing php code with DatePeriod, DateInterval classes

Hi, I dont understand DatePeriod, DateInterval classes very well. This question is linked to another one - http://stackoverflow.com/questions/3386952/how-to-display-converted-time-zones-in-a-generic-week-sunday-thru-saturday wherein I want to parameterize the solution offered by artefacto. Help would be appreciated! This is artefacto'...

Per-user TimeZones in a webapp using Spring

Hello, I have a web application which has different users logging in to view transactions. I want to be able to let the users set their own time zone and then have dates on forms be bound using the user's timezone so that they can search transactions in a database and have the results adjusted depending on what time zone the user is in...

How to format a datetime with minimal separators and timezone in VBScript?

I have the following code in C#: DateTime dt = GetDateTime(); string formatted = dt.ToString("yyyyMMddTHHmmsszz"); which returns a date in the following format: 20100806T112917+01 I would like to be able to get the same results in VBScript (for a legacy ASP application). It is especially important that I get the UTC offset informat...

Grails TimeZone issue, application wise and in Gorm entiteis

Okay, I've the strangest problem that I've just started to experience in a grails application working just fine for 2 months. Application is deployed on Linux/Tomcat 6 and MySQL is the DBMS at back end. When I type date on linux prompt, I get following output: $>date Sun Aug 8 03:52:06 PKT 2010 Where as in Grails application new Da...

Inconsistent time zone in results from Web Service

I have a web service for a production application that is returning different results to different clients for the same inbound request. I discovered this by configuring my clients to dump the raw WCF messages to trace files, which I then compared. For one client machine, the response includes date/times targeted at time zone +13:00 - ...

UTC to user's local time

I am creating a web application that will display the dates of various events that happened within the application (like a document being produced, for instance). Of course, the date displayed needs to be considerate of where the user is located (not just blindly output the stored date, since that would be the server local time). I've m...

How to get date in a specific timezone?

greetings all i am using the following method to get the current time in GMT timezone public static Timestamp getCurrentTimeGMT() { Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); long time = c.getTimeInMillis(); long offset = TimeZone.getDefault().getOffset(time); return new Timestamp(ti...

Problem in TimeZone display in java while using Russian locale

I am facing a problem while using Russian locale, Time Zone part of the date is not converting to Russian. i.e. if "Aug 10, 2010 4:02:09 PM Yakutsk Time" is the time, it is converting to - With Russian locale - "10.08.2010 16:02:09 Yakutsk Time 10" With French Locale - "août 2010 16:02:09 Heure du Iakoutsk" I am using following code ...

How to store TimeZoneInfo objects in a database?

Somewhat misleading title, I know. Never actually wanted to store TimeZoneInfo object themselves: rather, I want to store some culture-neutral identifier, which can then be later used to reconstruct an instance of TimeZoneInfo. Currently, I'm storing the value of TimeZoneInfo.Id property and it seems to be OK both on English and Russian...

MySQL timezone change?

How do I change my timezone which is currently in UTC to GMT +1, what is the correct line and do i just enter it in phpMyAdmin SQL execution? My host just gave me this link http://dev.mysql.com/doc/refman/5.1/en/time-zone-support.html and went off so I'm kinda lost thanks ...

PHP error_log not respecting the timezone setting?

Timezone problem in error_log? If I explicitly set the error_log directive to a file in php, and then use the error_log statement with a timezone, then why does it not respect my timezone? See below: [[email protected] ~]$ cat errlog.php <?php date_default_timezone_set('America/Los_Angeles'); ini_set('error_log', '/tmp/blah'); ini_set(...

Historical daylight savings in Windows

Is there a easy way in Windows (using Delphi, not .NET) to convert UTC times to a local time, with daylight saving adjustments. Data goes back 12 years, so needs to take account of changes in DST start/end dates over that time. ...

MySQL default time format UTC or GMT ?

Hi I'm so confused with this UTC and GMT I'm inserting in MySQL table as ex column "event_date" like "2010-07-01 23:50:00" (datetime) my client asking an option in front end as GMT +1 GMT +2 GMT -1 GMT -2 ...etc if I select any option GMT +2 the event_date will filter/list according to the GMT +2. I have no idea how to proceed and aft...

PHP TZ setting length

I was wonder what is the maximum length of the timezone settings in PHP? I'm storing the string in a database, and would like to keep the length as short as possible, but i see timezones like "Canada/East-Saskatchewan", which goes beyond our current limit. If I could just get a list of all the supported timezone string, I can sort them...

Overcoming timezone differences in MySQL Select

Hi everyone, I am trying to select entries for a current date but cannot seem to get past the issue of a 1 hour time difference between my timezone and that of the server. I was able to overcome this by using DATE_ADD() for adding entries but now I need to do the same to SELECT them. I tried inserting SET time_zone = 'America/New_York'...