timezone

Java does not seem to accept Romance as timezone alias. What should it be?

I'm trying to convert a date string from another application in Groovy. Something like "18-sep-2009 10:25:11 Romance Daylight Time" It looks like Java does not understand the Romance as timezone alias. "18-sep-2009 10:25:11 Pacific Daylight Time" works fine. Is there a fix for this other than parse the string and replace "Romance Dayl...

custom and dynamic time zones in java

I have a JSE 6 application that runs on an OS with a custom timezone. TimeZone.getDefaultTimeZone() returns 'GMT' as the timezone altough this is not correct. Does java supports custom time zones? Another problem is that the time zone configuration (daylight saving time transitions) could change while the application is running. Will ...

Correct Date and Time Columns in MySQL

I have a timezone mismatch I need to correct in a table. All dates and times before unix timestamp 1253568477 need to have 5 hours added to their values to make them equal GMT. I have the following columns... date (data type date), off by -5 hours time (data type time), off by -5 hours timestamp (data type int), this column is the co...

Rails app - how to enter events in local time zone

I am working on a Rails app that displays a sports schedule (in a basic table). Each game/event is a db table row. The customer wants all the events to display in chronological order but to also display the time in the event's local timezone. How can I add a timezone selector to the New action? So that when the customer enters events...

How to display local time with PHP

Our server is set to GMT time so the hour does not keep jumping around in spring and autumn. However, during summer time, it is annoying that all the times are displayed an hour out. How do I get and display the time, taking into account the local timezone in PHP (especially when the server thinks the local timezone is GMT). or, How do...

Django timezone mess

I'm working on a localized Django app with a simple forum. Some posts' timestamps show up as if they were posted 7 hours earlier. What's weird is that it happens to some users, sometimes (a user may post once and it's OK, posts again and it's wrong). settings.py: TIME_ZONE = 'Europe/Prague' LANGUAGES = ( ('cs-cz', _('Czech')), ) DATAB...

UTC within Site

Hi, I am working on a website that will only be available via the intranet but is a website that is Australia wide ONLY. The thing is, I have been asked to look into making the site UTC and was wondering how I could go about displaying a clock or determing which timezone the site in running in and so perhaps display a clock on the home...

How to get UNIX_TIMESTAMP to not offset a datetime field when in different time zones?

I have built a small forum where users can post messages. My server is in the United States, but the userbase for the forum is in Taiwan (+15hrs). When someone posts to the form, I store the time in my mySQL database in the format YYYY-MM-DD HH:MM:SS. When I look in the database, the time displays the proper time (the time that the pe...

java.util.Date is using TimeZone?

I have 2 different computers, each with different TimeZone. In one computer im printing System.currentTimeMillis(), and then prints the following command in both computers: System.out.println(new Date(123456)); --> 123456 stands for the number came in the currentTimeMillis in computer #1. The second print (though typed hardcoded) resul...

Row based Time Zones in Rails 2.3.4

What is the best way to handle the following situation: We have "admins" who create "events". These events can be nationwide, ie: different time zones. As of now there is a select menu with the current list of US time zones. There is a corresponding column in the database table, for the time zone selected. This is so the admin can selec...

ColdFusion Timezone Support?

Does ColdFusion 8 have any built-in support for handling timezones? We'd like our users to be able to choose a timezone and then have all dates/times on the site adjusted to their locale. Currently we're asking users to set an offset from server time, and it's a headache because they have to go in a couple times each year and manually ad...

.NET 2.0 - TimeZone Conversion

Hello; I need help in writing a function which should take a datetime object and target timezone and it should return a datetime object after converting it to the target timezone - WHILE considering Day Light Saving of either target or current timezone. Also, need a method to enumerate all available timezones. I have been able to achi...

Customizing time zones for Django users using geography

I am working on a Django app that needs to report the local time relative to the user. I would prefer not ask the user to input the time zone directly because I have his address stored in the database. I am only considering American users. Since most states in the USA are in only one time zone it is possible to calculate the time zone...

Get timezone offset in PHP given a unix timestamp

I have a Unix timestamp that comes from a database that is (unfortunately) in a timezone with a certain of either +3600 or +7200, depending on if it's DST or not. This has never been a problem before, but our website is currently moving to a more international audience and because of Javascript interaction with said timestamps, I need to...

Converting UK times (both BST and GMT) represented as strings to UTC (in C#)

I have to use some dates and times from a legacy database. They are represented as strings. Dates are dd/MM/yy. Times are HH:mm. I'd like to convert these to UTC as soon as I pull them from the database. I'm working on US systems, so need a common time. The problem I'm facing is how to convert them to UTC DateTime values. I can do the ...

Convert from Local Client System's Time to CST and vice versa

I need to store the datetime in CST timezone regardless of any timezone given. The Clients who access the application are from from various time zones, like IST, CST, EST,... I need to store all the datetime entered by the client in CST timezone to my database. And while retrieving, i need to convert back to there local timezone. How ...

Displaying timezones without using UTC

I've been reading up on how to do this all morning, and the general consensus is this: store your timestamps in UTC and calculate the offset from there. However, like most people, I am maintaining an existing codebase and I can't change the way we store our dates. At least, not in the allotted time frame. So my question is, can I safel...

.net JSON serializer returns local client time to browser?

I use an asp.net [WebMethod] to push a .net object back to the Ajax call on a browser. One of the properties of the object is of a DateTime type. When it arrives at the browser the time is seven hours before the time that is stored in the SQL Server. Okay, so my browser is in Peru (GMT-5) and the server is in Germany (currently GMT+2), ...

Where can I get a simple table of time zones for use in SQL server?

I just need to make a SQL table of time zones - at this point, my only need is to populate a drop-down list on an online form. I'm envisioning something simple with columns for ISO code, name, UTC offset, and perhaps a list of representative cities. I thought I would be able to easily find something online to copy-and-paste, but haven't ...

get client machine timezone in asp.net mvc

How to get the time zone id (ex.: Central Standard Time) of the client machine in asp.net mvc? ...