Is there a cross-platform function in python (or pytz) that returns a tzinfo object corresponding to the timezone currently set on the computer?
environment variables cannot be counted on as they are not cross-platform
...
I have created an application.in the app i start a countdown timer and save current date as double value in database also i save end date according to countdown timer .after closing and return to app i get time form database find the difference between current date and start date and set the countdown according to that.but a problem occu...
I'm working on a GWT app where I need to support the following scenario:
The server is located in time zone A
The client's browser is set to time zone B
The GWT app is configured to display date/time in time zone C
Since GWT does not support Calendar and the native support for time
zones in javascript is non-existent I can't think of a ...
I am allowing users on my web app to schedule events based on time zones of their choice.
I want to present a good list of time zones to the end user and then convert it easily to java.util.TimeZone object at the server end.
String[] TimeZone.getAvailableIds() is something I could use, but the issue is that it prints about 585 time zo...
Hello all,
I'm currently having an issue wrapping my brain around the notion of converting my MySQL time to a specific timezone, depending on the user's settings.
All of my MySQL times are stored in UTC time, in the following format:
2009-11-08 17:06:40
Once I query the time, I'm not quite sure how to convert it to the appropriate...
How do I change time and time zone in the iPhone simulator?
...
I want to show the timezone code such as BST or GMT based on the user's locale. However in each browser it is positioned in different places from new Date().toLocaleString() and on some browsers (such as Opera) not available at all.
It looks like the solution would be to get a database or structure of timezone codes against timezone off...
As the title infers I need to find a time zone (or perhaps just the UTC offset) based on a pair of coordinates. I've been searching for different solutions, and there is a couple of web services out there but I need to be able to access the application offline. As the timezones isn't completely based on longitude it doesn't seem that eas...
Hi,
I'm just starting to think properly about rolling out a webapp that will need to do things to users at the start of their day, say 6am. Also at the end of their days.
Everywhere I've been reading about people saying a lot just to use .ToUniversalTime to store the time in UTC, but when I tried this (as I suspected) it didn't work, a...
Hi guys,
A really dodgy problem I've got. Here's my model:
class Entry < ActiveRecord::Base
default_scope :order => 'published_at DESC'
named_scope :published, :conditions => ["published_at < ?", Time.zone.now], :order => 'published_at DESC'
belongs_to :blog
end
Now if I do
@entries = Entry.published.paginate_by_blog_id @blog....
I'm having weird problem with java TimeZone..
Calling TimeZone.getDefault() gives my local time zone, which has an ID "GMT+02:00".
Funny thing is that this ID doesn't appear in a list provided by TimeZone.getAvailableIDs(). Apparently my zone appears to be "Etc/GMT+2".
I'm trying to populate a combo with time zones, but it's impossible...
I know there are other similar questions to this, but I came up with my own way of getting the current time in a specific time zone, so I just wanted to confirm if it is correct or not, or there are gotchas I didn't take care of.
Calendar cal = Calendar.getInstance();
// Assuming we want to get the current time in GMT.
TimeZone tz = Ti...
I'm using Joda Time, and I'm being passed DateTimeZones that are created using DateTimeZone.forOffsetHours(). I'd like to print these timezones using standard timezone acronyms such as "PST", "EST", etc.
However, whenever I print DateTimes that use these timezones, I get an "hh:mm" representation of the timezone instead of the name acr...
This is a little embarrassing, but I have not been able to find good resources on this topic.
I'm working on a Google App Engine application that requires sophisticated time zone conversions. Since I am nowhere near the imposed quotas, I have opted to go with PyTZ. However, I must be doing something wrong. What I've done so far is:
Do...
Hi,
Is there a way to find out visitors' timezone in PHP?
...
I have a PDF that users must complete. The PDF has date and time fields on it. The PDF instructs the users to input the date and time in Eastern format (Not EST or EDT). When the user completes the PDF they then generate XML from the PDF and and upload the XML to a Java application. The issue here is that the users may enter the time in ...
I I have a timezone taken from a user that must be converted into total minutes to be stored in the database. I have the following code and it looks pretty ugly. I am new to C# and was wondering if there is a better way to do this.
string tz = userList.Rows[0][1].ToString().Trim();
//Timezones can take the form of + or - followe...
I wanted my application to just have one TimeZone object which will be used by many SimpleDateFormat and Calendar objects from the other places concurrently. This is to avoid having to always do TimeZone.getTimeZone(ID).
I know SimpleDateFormat and Calendar classes are not thread safe, which is why I configure one thread to always cr...
Our current app stores all dates via the server's datetime. I'm thinking we need to update all datetime values in the database over to UTC time.
Now for displaying these dates back to the user, I know .Net 3.5 has datatypes that are specific to date time offsets. But does anyone see anything wrong with setting an application variable...
Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5.
I need help knowing which of these would be the best to attempt to use when trying to get the UTC offset from the user on register.
One:
<option v...