timezone

[php] Opening app to world market. How to quickly allow for timezones and date/number handling

Hey Guys, What is the quickest way to internationalise a php webapp? We need to be able to change all times & dates based on a timezone selected by a user... [edit: this application is already in production. I've been given the task of making it usable on an international level asap.] ...

CdoTimeZoneId -> TimeZoneInfo

Hello all, I have to convert UMC datetime into user-friendly form, based on time zone, encoded by a single number. This number is a member of CdoTimeZoneId enum ('Value' column here: http://msdn.microsoft.com/en-us/library/ms988620(EXCHG.65).aspx). As far as I understand, CdoTimeZoneId is a part of Exchange Server SDK, but my applicatio...

How do I convert from unix epoch time and account for daylight saving time in C#?

I have a function that converts from unix epoch time to a .NET DateTime value: public static DateTime FromUnixEpochTime(double unixTime ) { DateTime d = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); return d.AddSeconds(unixTime); } Where I am (UK) the clocks go one hour forward for summer time. In Python I get the local Ep...

Timezone convert result error

CCT is UTC + 6:30 and SGT is UTC + 8:00. However result is wrong NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setDateFormat:@"MMMM dd, yyyy h:mm"]; // The date in your source timezone (eg. EST) NSDate* sourceDate = [NSDate date]; NSLog([formatter stringFromDate:sourceDate]); NSTimeZone* sourceTimeZone = ...

How can I get the list of metazones from Zend Framework's Zend_Locale?

Hi, I'm trying to have a list of all the most common time zones for a UI component. By digging in the Zend framework I found that supplementalData.xml (used by the Zend_Locale component) has a list of metazones, with prefered TZ database time zone names <mapTimezones type="metazones"> <mapZone other="Acre" territory="001" ...

php - list of dates coming up

All the users are in the United States. I need to be able to list all weekdays besides today. So say that it's Thursday, October 7. It should start by listing Friday, October 8 and then Monday, October 11. I know how to make sure I'm only listing weekdays when looping through, but the trouble I have is making sure tomorrow is tomorrow. ...

php - adjusting for timezones

Alright so I have this code which makes a list of dates: $dates = array(); for($i = 1; $i < 10; $i++) { $datetime = mktime(12, 0, 0, date('n'), date('j') + $i, date('Y')); if(date('N', $datetime) != 6 && date('N', $datetime) != 7) { ...

How to display the current time continously in a different time zone?

Hi, I would like to display the current time continuously but in a different time zone? The following code will display the current time continuously. Can I update to get the time in a different time zone.? <script type="text/javascript"> function ShowTime() { var dt = new Date(); document.getElementById("<%= T...

Are Linux's timezone files always in /usr/share/zoneinfo?

I'm writing a program that needs to be able to read in the time zone files on Linux. And that means that I need to be able to consistently find them across distros. As far as I know, they are always located in /usr/share/zoneinfo. The question is, are they in fact always located in /usr/share/zoneinfo? Or are there distros which put them...

Convert time and date from one time zone to another in PHP

Basically what I need is an script that, when provided with a time and a timezone can return the time in another time zone. My main issues are: Where to get the time offset from GMT from - is there a public database available for this? How to also take into consideration the daylight saving time (DST) differences as well. How to nice...

Get timezone offset for a given location

Is it possible in PHP to get the timezone offset for a given location? E.g. when given the location "Sydney/Australia" to get the timezone offset as "+1100". Bonus would be for this function the keep daylight savings in mind (i.e. it's aware of daylight savings and adjusts the offset according). ...

How can I convert of the unix date output across multiple time zones to UTC, in Perl?

In Perl, how would one efficiently parse the output of unix's date command, taking into account time zone, and also convert to UTC? I've read many similar questions on stackoverflow, but few seem to take into account parsing multiple time zones. Instead they seem to set the timezone manually and assume it to stay fixed. # Example Inpu...

Time zone java : San Antonio, Texas

Hi I am looking to set the timezone for San Antonio, Texas.Can some please tell me how do i set the same in my Java code. I want it in the format somewhat similar to America/New York Currently I am using TimeZone.getTimeZone("America/Denver") But "America/Denver" doesn't seem to be the right timezone for San Antonio, Texas ...

Timed sales in different timezones

Hi peeps, working on a website that will sell one item each day that will run for a period of hours specified by me. The site is much like groupon where when the timelimit is up, it will end the deal. My problem is how do i go about implementing this worldwide where different countries have different timezones? Im trying to refrain from ...

JAVA TimeZone issue EDT Vs EST

Hi Folks, I a newbie to java and hence haven't been able figure this out since quite some time. I am using Windows XP and the machine is set to TimeZone: Eastern Time (US & Canada). I have a Java application, which takes the current system time and timezone info and writes a string like: 20101012 15:56:00 EST, to a file. The last pi...

Why Python sets my default timezone to -1?

I use Python to track the version between local SQLite and remote web page. It is useful to compare them by Last-modified and file size information from the HTTP response. I found something interesting during development. def time_match(web,sql): print web,sql t1 = time.strptime(web,"%a, %d %b %Y %H:%M:%S %Z") t2 = time.strptime(s...

How to set TimeZoneInfo in ASP.NET data bound DropDownList to user's time zone?

I have a web app hosted with GoDaddy (so the web server is in Arizona - Mountain Time). My users are mostly in Central Time Zone, but I could have some from other time zones. I have a web page with a databound dropDownList using TimeZoneInfo, and I want to set the selected value of this dropDownList to whatever timeZone the user is i...

How do i know timezones - PHP

How can i know the current time at different places example:- Local time in America & london wud differ 1) So if a user from USA visit my website, I should be able to show him his local time 2) If a user from London visit my website, his/her local time should be populated how can i solve the above issue ?? Thanx for the help... ...

Server timezone dilema

Hi Guys, I have strange problem and would like to use one of yours opinion. I am setting up servers grid, all will be based in UK at first and then expand to other countries. My problem is should I stick with GMT or use BST, what is your opinion in terms of global timezone settings. cheers, /Marcin ...

android java.util.TimeZone problems with daylight savings time implementation?

It appears that the java.util.TimeZone implementation in Android is broken (at least in 2.2). For instance TimeZone denver = TimeZone.getTimeZone ("America/Denver") ; TimeZone phoenix = TimeZone.getTimeZone ("America/Phoenix") ; Running under the emulate in Eclipse, denver.hasSameRules (phoenix) returns true, and it should return fals...