How can I determine a web user's time zone?
Is there a standard way for a web server to determine what time zone offset a user is in? From an HTTP header or part of the user-agent description, perhaps? ...
Is there a standard way for a web server to determine what time zone offset a user is in? From an HTTP header or part of the user-agent description, perhaps? ...
I am running a Tomcat application, and I need to display some time values. Unfortunately, the time is coming up an hour off. I looked into it and discovered that my default TimeZone is being set to: sun.util.calendar.ZoneInfo[id="GMT-08:00", offset=-28800000,dstSavings=0,useDaylight=false, transitions=0,lastRule=null] Rather...
Store everything in GMT? Store everything the way it was entered with an embedded offset? Do the math everytime you render? Display relative Times "1 minutes ago"? ...
I am writing a program that needs to send out an email every hour on the hour, but at a time local to the user. Say I have 2 users in different time zones. John is in New York and Fred is in Los Angeles. The server is in Chicago. If I want to send an email at 6 PM local to each user, I'd have to send the email to John at 7 PM Server tim...
How do you set the Windows time zone on the local machine programmatically in C#? Using an interactive tool is not an option because the remote units have no user interface or users. The remote machine is running .NET 2.0 and Windows XP Embedded and a local app that communicates with a central server (via web service) for automated dir...
Is there any library (or even better, web service) available which can convert from a latitude/longitude into a time zone? ...
I'm on .NET 2.0, running under Medium Trust (so TimeZoneInfo and the Registry are not allowed options). I'm asking the user for two dates and a time zone, and would really love to be able to automatically determine whether I need to adjust the time zone for DST. This probably isn't even a valid scenario unless I have some very robust...
Is there a web service of some sort (or any other way) to pull a current time zone settings for a (US) city. For the parts of the country that don't follow the Daylight Saving Time and basically jump timezones when everyone else is switching summer/winter time... I don't fancy creating own database of the places that don't follow DST. Is...
I sometimes have to work on code that involves me moving my clock ahead forward. In this case some .cpp or .h files get their last modification date updated to the future time as I work on them. Later when my clock is fixed, and I go to compile, it requires a rebuild of most of the project because some of the last modification dates ar...
I want to convert various location/date/times in history from GMT to local time. It seems that SystemTimeToTzSpecificLocalTime is better than FileTimeToLocalFileTime. When the date/time pairs also include various locations, the conversion gets hairy. I've found a data set at ftp://elsie.nci.nih.gov/pub/ that seems to be nicely complete ...
I have a database field that contains a raw date field (stored as character data), such as Friday, September 26, 2008 8:30 PM Eastern Daylight Time I can parse this as a Date easily, with SimpleDateFormat DateFormat dbFormatter = new SimpleDateFormat("EEEE, MMMM dd, yyyy hh:mm aa zzzz"); Date scheduledDate = dbFormatter.parse(raw...
I need to store the timezone an email was sent from. Which is the best way to extract it from the email's 'Date:' header (an RFC822 date)? And what is the recommended format to store it in the database (I'm using hibernate)? ...
How do I properly represent a different timezone in my timezone? The below example only works because I know that EDT is one hour ahead of me, so I can uncomment the subtraction of myTimeZone() import datetime, re from datetime import tzinfo class myTimeZone(tzinfo): """docstring for myTimeZone""" def utfoffset(self, dt): ...
I'm trying to present the (web) user with a useful subset of Olson timezones, though with a friendlier naming convention. Any recommendations for how to sort and label them for maximum usefulness? By country? Continent? GMT offset? I'm not very concerned about inaccuracy for past dates, so some of the timezones that are only histori...
Is there a way to retrieve the time zone choices in Windows Mobile in order to display them in a GUI? It would be much better not to have to show every 15 minutes just to be able to display GMT+5:45 for Kathmandu. ...
I have Apache 2 running on a VPS server (running Debian). I recently changed the timezone on the server (using dpkg-reconfigure tzdata) from America/New_York to America/Los_Angeles to match my move across country. I have also rebooted the virtual machine since making the change. However, the Apache processes seem to flitter between ti...
I have a multi-timezone web application that stores all of the datetime values in UTC in the database, when actions happen on the server, I can easily convert the time into UTC. However, when a client enters a time or time span, what is the best way to detect and store it? I am currently doing the following: Get the value of Date.get...
I am aware of the System.TimeZone class as well as the many uses of the DateTime.ToString() method. What I haven't been able to find is a way to convert a DateTime to a string that, in addition to the time and date info, contains the three-letter Time Zone abbreviation (in fact, much the same way StackOverflow's tooltips for relative ti...
My database application is going to be deployed at multiple sites in different time zones. I need a T-SQL function that will determine the UTC timestamp of midnight on January 1 of the current year for YTD calculations. All of the data is stored in UTC timestamps. For example, Chicago is UTC-6 with Daylight Savings Time (DST), the fun...
What's the easiest way to get the UTC offset in PHP, relative to the current (system) timezone? ...