timezone

Offset of a given timezone from GMT in linux shell script

Is there a way to get the offset of a given timezone (identifier like EDT or America/New_York) from GMT in linux shell script? ...

Country to timezones in PHP/Zend Framework

Is there a way in Zend Framework or default PHP to map a country (using country code) to a list of timezones? As an example I'm trying to replicate the Google functionality when searching for "time in australia right now" which displays all of the timezones and cities for that country. ...

How do I find difference between times in different timezones in Python?

I am trying to calculate difference(in seconds) between two date/times formatted as following: 2010-05-11 17:07:33 UTC 2010-05-11 17:07:33 EDT time1 = '2010-05-11 17:07:33 UTC' time2 = '2010-05-11 17:07:33 EDT' delta = time.mktime(time.strptime(time1,"%Y-%m-%d %H:%M:%S %Z"))-\ time.mktime(time.strptime(time2, "%Y-%m-%d %H:%M:%...

Using client time to calculate timezone

Hi Folks, Instead of asking a client timezone in registration form (to correctly format datetime, all server dates in UTC) I thought about fetching a time from client computer and calculating time offset between client and server. Anyone tried this? How often clients have something insane on their system clocks? Cheers! ...

PHP: How do I convert a server timestamp to the user's timezone?

Hi, I'm currently storing times using the 'time()' function in the database. However, it's using the timezone of the server, and I'd like for each user to see the time according to their timezone (set in their profile). How do I do the timestamp conversion? (and I mean from timestamp to timestamp, not to readable time) Your help is ap...

.NET timezone information

What is the standard format for datetime with timezone in a C# ASP.NET application? Updated to clarify: In ASP.NET I need to check a datetime from a Domino database against a .NET DateTime. The client is asking what would be the best format in which he should provide the datetime with the timezone. Meaning which format is most easily re...

relativity of the timestamp to the time zone

Hi, I wonder if, when you call something like that time(); it returns the timestamp relatively to your time zone setting or to UTC ? For example, when syncing two agents, that must be important to take care of it, doesn't it ? ...

Timezone conversion

How do I convert timezone from this format "03/03/2010 03:24:42 PM EST" to the current timezone in asp.net? ...

Does UNIX time record Timezone?

I want to ask about UNIX time, Does UNIX time record Timezone? I moved my hosting from Chicago/America to JST. The problem is that my whole MySQL database has records of UNIX time (Chicago/America timezone) I have a PHP code to show the time ago (ex 3days ago, yesterday, etc) When I move to the new server it says tomorrow To avoid th...

Can I get the browser time zone in ASP.NET or do I have to rely on JS operations to retrieve the information?

Can I get the browser time zone in ASP.NET or do I have to rely on JS operations to retrieve the information ...

Please help me regarding Time Zones of different Countries

I am creating a web site which in which the service providers can create their schedule (date and time) at which they can provide service and client can book them. but the problem is that service providers are from different countries. so their is Time zone problem. please give me a best solution for it, that i should convert the time of...

How to set the time for a specific local in javascript

Hi, i have a problem, and maybe someone can help me, i will explain... i have the in javascript "var date= new date();" and its give me the local time (browser time) but i want force this data/time for a especific local... for example... Spain. i want everytime that someone enter in the page (from others country) the date need be the ...

Millisecond to various GMT tomezones conversion

Hi, I have a time in millisecond i.e. 1274203800000, now i want to convert it into GMT + 10 in javascript. currently i am using following code to do that var milliseconds=1274203800000; var offset='+10'; var d = new Date(milliseconds); utc = d.getTime() + (d.getTimezoneOffset() * 60000); nd = new Date(utc + (3600000*offset)); var res...

Oracle TIMESTAMP w/ timezone data type confusion

When would you use TIMESTAMP w/ timezone as opposed to TIMESTAMP w/ local time zone? When data is stored in a column of data type TIMESTAMP w/ local tz, the data is normalized to the database time zone, and the time zone displacement is not stored as part of the column data. When users retrieve the data, Oracle returns it in the users'...

Changing timezone without changing time in Java

Hi! I'm receiving a datetime from a SOAP webservice without timzone information. Hence, the Axis deserializer assumes UTC. However, the datetime really is in Sydney time. I've solved the problem by substracting the timezone offset: Calendar trade_date = trade.getTradeDateTime(); TimeZone est_tz = TimeZone.getTimeZone("Australia/Sydney")...

PHP date function not accepting timezone change

Hello, I've set up a quick little test to understand and debug timezones between mySQL and PHP. Here's the page: http://dev.feedingo.com/test_dates.php The dates are being created in mySQL using NOW() in a datetime field. The initial problem I was trying to figure out is what timezone mySQL is using and how to sync it up with PHP. B...

Reverse Timezone offset

I have a timezone name and I want the name of the timezone double its offset. For instance, Asia/Dubai is +4, I want to reverse that to -4... and have it resolved to EDT Language: PHP Here's a sample of what it would look like: $timezone = "Asia/Dubai" $offset = $timezone->getOffset(); $offset 0 - $offset; $timezone = $offset->getTim...

Autodetect timezone in Rails given UTC offset and DST

I basically want to autodetect a user's timezone using Rails. I can use this JS code at the user's browser (http://www.onlineaspect.com/2007/06/08/auto-detect-a-time-zone-with-javascript/) to send a form with the UTC offset and the fact that the time zone observes DST during summer or not, in the user's time zone. Once I have that info ...

Get client timezone (not GMT offset amount) in JS

I need to determine the client timezone (e.g. CET, GMT, EST) in JS. Getting the offset is straightforward, but doesn't have all the info necessary to determine the TZ, at least not easily. I have a feeling it might be possible to use a combination of offset, whether DST is in use and in effect, etc. but I'm hoping someone else has done t...

Find time zone from IP address

Is there a way to find the time zone a user is in when all I have is their IP address? I'm looking for the time offset I need to apply to the server time in order to find the time for the user's location. ...