timezone

How can I switch timezones in Perl's Template::Plugin::Date?

I have a calendar on my website, generated in Perl using Template::Toolkit and Template::Plugin::Date. It highlights the current day. I achieve this by iterating through all the dates (as I print the calendar) and comparing against the current date. Something like this: [% IF cur_date == date.format(format = '%Y-%m-%d') %] ... [% END ...

Select from mysql by day with different timezones (php)

I'm storing leads in a database, and each lead has a datetime field with a PST timezone based date & time. I want my user to be able to display all leads from a certain date (e.g. today, yseterday), and choose the timezone. E.g. if I want to see all leads that were generated yesterday in EST timezone, I need to first convert (or read) ...

How to set a JVM Timezone Properly

I am trying to run a java program, but it is taking a default GMT timezone instead of a OS defined timezone. My jdk version is 1.5 and the OS is Windows Server Enterprise (2007) Windows has a Central timezone specified, but when I run the following program, it gives me a GMT time. import java.util.Calendar; public class DateTest { ...

Oracle: set timezone for column

Hi, I need to do migration date->timestamp with timezone similar to described here: http://stackoverflow.com/questions/1664627/migrating-oracle-date-columns-to-timestamp-with-timezone. But I need to make additional convertion (needed to work correctly with legacy apps): for all dates we need to change timezone to UTC and set time to 12:...

Rails custom TimeZone

Hi all, How can I set my rails application with custom timezone? I want to set my application timezone with UTC-04:00 without daylight saving. update: To clarify my question, I understand that I can set the time zone name in the environment.rb file with one of the names from TimeZone constants. I want my application timezone as UTC ...

NSDate expressed in different time zones, i.e. local time zone (GMT-400) to PST

I know how to use NSTimeZone to derive the offset for the current time in another time zone. NSDate always returns relative to GMT, so how do I derive a string with the proper time zone information? i.e. I take the current time where I am (in EST) and using NSTimeZone end up subtracting the 3 hours necessary to represent the time in PST....

Timezone conversion in php

can anyone suggest an easy method to convert date and time to different timezones in php ...

Consideration of cron job with respect to time

Hi all, Is it possible to run my cron job according to the GMT where as, my server is cosidering IST time formats. In future is it possible to use different time zones...? To do this can anyone suggest what all steps i need to follow as i am working on linux. Thanks in advance.... ...

Wunderground and UTC Offset

I am consuming the international weather forecasts via Wunderground's XML API: http://wiki.wunderground.com/index.php/API_-_XML Looking at an output for Kabul, Afghanistan for instance: http://api.wunderground.com/auto/wui/geo/ForecastXML/index.xml?query=OAKB I notice that there is no UTC offset. The closest that I can see is this:...

Time Zones for different users

I am creating a script that allows the user to choose their own timezone... If I am to make this work, how do I store dates in the database so that every timezone will read it, and show the correct date in their timezone? Do I store the date as GMT and then when a user with the timezone GMT +10 selected views the item within my script,...

Django Timezone Confusion; Postgres and Apache

Setup: Multiple sites on Django on the same set of servers, being served by the same group of Apache processes. Some sites are Eastern TZ; some are Central. Database is PSQL running on a separate server. When I started, I didn't put much thought into how the various sites would handle timezones; I guess I saw the TIMEZONE setting in Dja...

what is the default timezone in Websphere 6.1

Hi am running websphere 6.1 on RSA what is the default timezone set on it if i dont set any websphere variable etc(like the TZ variable). Running into this weird issue where my application shows timestamp correctly for User timezone ,when i run it from my dev env but pulls out all timestamps in GMT irrespective of the logged in users ti...

MySQL CONVERT_TZ() help

Greetings all (from a MySQL beginner) I am trying to set up a database that stores daily alert times as specified by users. For example, the user wants to receive an alert if some criterion is met each day between 7:00 AM and 7:30 AM. In trying to implement this, I need to accommodate daylight saving time. Here's my attempted solutio...

Daylight saving time and Timezone best practices

I am hoping to make this question and the answers to it the definitive guide to dealing with daylight saving time, in particular for dealing with the actual change overs. If you have anything to add, please do Many systems are dependent on keeping accurate time, the problem is with changes to time due to daylight savings - moving the c...

Timezones and the DateTimeField - Django

Hi folks, I'm trying to implement a "time ago" feature, for the displaying of items on a site. As I'm caching the pages I wish to use javascript in order to render the "time ago". Javascript knows local time and problably the Timezone of the local machine so I could play with that, but that would require to hard code the server's timez...

Determining the date in a timezone that is different than Time.zone

My Rails application makes use of Time.zone so that each user can set their own timezone and see timestamps in the correct zone. However, I would like to have some content that is only available for one day, but for that one day to be the same 24 hours for all users. In order to do that, I was going to use if Time.zone.today == Time.zon...

Get a user's timezone in Python + Pylons

Is there a way to get the timezone of the connecting user using Pylons, and to adjust the content before rendering accordingly? Or can this only be done by JS? Thanks. ...

how to store "2010-03-26 10:13:04 Etc/GMT" mysql?

Hi All, I would like to store "2010-03-26 10:13:04 Etc/GMT" value in column of type datetime. when i try to insert it i got exception SQLException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '10:13:04 Etc/GMT', at line 1 how to insert data tim...

Convert UTC DateTime to another Time Zone

I have a UTC DateTime value coming from a database record. I also have a user-specified time zone (an instance of TimeZoneInfo). How do I convert that UTC DateTime to the user's local time zone? Also, how do I determine if the user-specified time zone is currently observing DST? I'm using .NET 3.5. Thanks, Mark ...

XmlSerializer.Deserialize method appends timezone to a time and datetime field

Have a small script in Microsoft.NET 2.0 that deserializes a XML back to a typed object, connects dyanimcally to a web service using ServiceDescription and binds the deserialized typed object to the WebMethod inbound. The XML prior to serialization looks like below <completion_time>12:19:38</completion_time> on the wire when communic...