timezone

How do I access the .NET TimeZoneInfo class from SQL Server 2005?

The TimeZoneInfo class has a Host Protection Attribute of MayLeakOnAbort. This seems to prevent me accessing it from the SQL Server CLR. But is there a workaround? ...

Using TimeZones on website using ASP.Net 3.5 / SQL Server 2005

I am trying to determine, how I should implement local time in a web-app. All users are logged in, there are no anonymous users. They will need to see all time-values in their local time. Is this how it should be done? All DateTime values are saved as UTC-time in database Each user has a UTC-Offset value stored in his profile When dis...

DATETIME - three hours behind timezone

Hey, I am using DATETIME as a column type and using NOW() to insert. When it prints out, it is three hours behind. What can I do so it works three hours ahead to EST time? I am using php date to format the DATETIME on my page. Thanks, Ryan ...

iphone app programming: existing plist file for time zones?

Is there a plist file that lists the timezones and maybe a corresponding city? Being able to select a couple of time zones (independent of the users location/iphone settings) is a requirement in an application I am writing. I am hoping I don't have to reformat some existing list into a plist. Thanks, Mike. ...

Get Daylight Saving Transition Dates For Time Zones in C

In C, is there a simple, cross-platform way of retrieving the dates that a given timezone begins and ends daylight saving? I already have timezone offset information and whether or not daylight savings is currently being observed, but I really need the dates at which daylight savings begins and ends (for an external dependency I don't...

Changing timezone on an existing Django project

Like an idiot, I completely overlooked the timezone setting when I first built an application that collects datetime data. It wasn't an issue then because all I was doing was "time-since" style comparisons and ordering. Now I need to do full reports that show the actual datetime and of course, they're all stored at America/Chicago (the ...

Convert TDateTime to Another Time Zone Regardless of Local Time Zone

Regardless of what the user's local time zone is set to, using Delphi 2007, I need to determine the time (TDateTime) in the Eastern time zone. How can I do that? Of course, needs to be daylight savings time aware. ...

Time Zones

I know this isn't specific to PHP, but what's the point of using timezones listed like this :http://us2.php.net/manual/en/timezones.america.php? For example "America/Indianapolis" and "America/New_York". What is the problem with EST, EDT, CST, CDT, &c? ...

Is it possible to get a timezone in python given a utc timestamp and a utc offset?

I have data that is the utc offset and the utc time, given that is it possible to get the users local timezone (mainly to figure if it is dst etc. probably using pytz), similar to the function in php timezone_name_from_abbr ? For example: If my epoch time is: 1238720309 I can get the utc time as: d = datetime.utcfromtim...

Get viewers local time with PHP?

I need to allow users to a commit a certain action on my website once a day and I'd like this it reset at midnight of the users' local timezone. What's the best way to accomplish this with PHP? ...

Time Zone Weirdness in Rails

This is a really weird Rails problem - I have googled to see if this is related to a known bug, but haven't found anything - would be gratfeul for useful links as well as solutions. I can boil the problem down to this: If I start up my Rails App, and execute the following Rails code via an HTTP request. Time.zone = 'Europe/London' log...

How to get Time Zone through IP Address in PHP

Hi, I want to get time zone through IP Address in PHP. Actually i have an application which will run at the client machine. I have IP address of client machine. But not able to get the time zone for each client machine. Please reply me. Thanks Devesh M ...

Timezone in PHP

PHP seems to use a rather annoying method for setting the evnironment timezone, using region names rather than the GMT offset. This makes having a timezone dropdown a huge pain, because it either has to be huge to accommodate all possible PHP timezone values, or I have to find a way to convert a GMT offset to a valid value to pass to PHP...

get current time based on timezoneid in javascript

Hi All! Is there any way to get the current time for a particular timezone (ex: var currentTime=getCurrentTime(timezoneId) where timezoneId="alaska" or Eastern Time), including Day Light Saving in javascript. ...

Converting Between Local Times and GMT/UTC in C/C++

What's the best way to convert datetimes between local time and UTC in C/C++? By "datetime", I mean some time representation that contains date and time-of-day. I'll be happy with time_t, struct tm, or any other representation that makes it possible. My platform is Linux. Here's the specific problem I'm trying to solve: I get a pair ...

Timezone issue PHP 5.2 Windows (WAPP stack)

On a Win2k server, using a WAPP stack (Windows,Apache,PostgreSQL,PHP). Running a PHP web application. Also tested using PHP interactive console. The datetime is reported correctly, but for some strange reason the timezone is reported incorrectly: php -a <?php echo date('c'); 2009-04-19T16:52:35-04:00 C:\WAPP\php>time /t 17:06 C:\...

How to detect user time-zone in sign up forms?

Time zones can be hard to select from dozens of options. I would like to make this process simpler. I saw some forms in the wild that can do the best guess. I Goggled for a solution but with out any luck. Do any one have an idea how to do it? ...

Suggestions for dealing with time offsets in mysql

Distilling this project down to the simplest of terms; Users click a button, a record is made with a timestamp of NOW(). NOW() of course equals the time on the server of record creation. I need to show them stats based on their timezone, not mine. What is the best method for dealign with time zone offsets in MySql? Is there a spe...

Make a date object take timezone into consideration

I'm using the following piece of code: $.log('Ending time: ' + ending_time); $.log('Now: ' + new Date()); $.log('Difference: ' + new Date(ending_time - new Date())); The output is the following: Ending time: Thu Apr 23 2009 14:31:29 GMT+0200 Now: Thu Apr 23 2009 11:56:02 GMT+0200 Difference: Thu Jan 01 1970 03:35:26 GMT+0100 I'm us...

building timezone feature in PHP web application

This is almost similar question to this one: - http://stackoverflow.com/questions/346770/dealing-with-timezones-in-php I read that thread, and have some more issues, and not sure of how to elegantly build timezone support in PHP/MySQL application. I am writing an application in PHP, where users can select their timezone. Here, all ti...