timezone

passing timezone from client (GWT) to server (Joda Time)

I'm using GWT on the client (browser) and Joda Time on the server. I'd like to perform some DB lookups bounded by the day (i.e. 00:00:00 until 23:59:59) that a request comes in, with the time boundaries based on the user's (i.e. browser) timezone. So I have the GWT code do a new java.util.Date() to get the time of the request, and send...

Display DateTime in GridView using user's time

I have a DateTime stored in UTC time that I'd like to display to the user in their local time from within a GridView control. How can I convert my DateTime to the user's time (not my server's local time)? Here is my current field as it appears in the GridView Columns collection: <asp:BoundField DataField="RunTime" HeaderText="Run Time...

How to use Region Time Zone with a .Net application?

I'm working on an asp.net mvc application. Each user have his own time zone. Right now, I'm using "TimeZoneInfo.GetSystemTimeZones" to generate a drop down list in order for the user to select a timezone and this is what I store in my db They are like that: Morocco Standard Time (00:00:00) UTC (00:00:00) GMT Standard Time (00:00:00) ......

php date() function displaying wrong time

I'm building a site with wordpress, and when I use the date() function on an otherwise empty file, it shows the right date. However, if I use it in a file that includes other wordpress files, the time is displayed as GMT time, so the date is off. If anyone can figure out how I can use date function without interruption from the wordpre...

iPhone: convert Nsstring to Nsdate on device timezone

hi all, I received date from Web service which is in GMT + 1 format (2010-02-25T20:16:50.387+05:30). I want to convert in NSdate. I have no proper idea about date formatter. Please suggest that how can i Change this nsstring value to current date format (Time zone) ...

How to get clients timezone offset from his ip address

Hello, I want to get clients Time Zone offset from his IP address for my web app. I have tried using Javascripts getTimezone function, but, some clients have their timezone or time set incorrectly. I want to get the offset and render some information back on client based on their timezone. Thanks for taking time to read the question. I...

addition of gmt times in php

Hi , i have a time zone in 2010-05-04T05:27:00.000Z format which indicates the GMT time and i want to add GMT 10+ in to it using php. i can do that thing using following code but how would i directly add 2010-05-04T05:27:00.000Z and GMT 10+ so that i can get a valid date and time. $offset=10*60*60; $dateFormat="d-m-Y H:i::m:s"; echo ...

how to detect day light saving automaticaly in php

how to detect day light saving automaticaly in php ? ...

TimeZoneInfo - why can't i seem to create an instance of it?

I'm trying to use the EWS API to access an Exchange server from a console program i'm writing. I've specified the type of exchange server i'm connecting to but when I try to execute the code i have, it gives me Error 1 The type 'System.TimeZoneInfo' is defined in an assembly that is not referenced. You must add a reference to assembly '...

rails conditional find based on datetime with timezone

I have a rails (2.3.4) application and want to send users a daily update via mail. To make things more comfortable, users can choose the time when they want their daily mail. My question: how should I store and more importantly lookup this time so as users' time zone, in particular daylight savings are respected? Currently, we save a 'p...

How to ignore user's time zone and force Date() use specific time zone

In an JS app, I receive timestamp (eq. 1270544790922) from server (Ajax). Basing on that timestamp I create Date object using: var _date = new Date(); _date.setTime(1270544790922); Now, _date decoded timestamp in current user locale time zone. I don't want that. I would like _date to convert this timestamp to current time in city of...

Working with timezones in C

Hi, I'm currently migrating some of my code from Cocoa (Apple's Objective-C API) to C, in order to make it available for other operating systems, such as GNU/Linux. In Cocoa, there were many great things like creating NSTimeZone objects from their string descriptors using timeZoneWithAbbreviation:. This allowed me to use values like "E...

Recurrent yearly date alert in Python

A user can set a day alert for a birthday. (We do not care about the year of birth) He also picks if he wants to be alerted 0, 1, 2, ou 7 days (Delta) before the D day. Users have a timezone setting. I want the server to send the alerts at 8 am on the the D day - deleta +- user timezone Example: 12 jun, with "alert me 3 days before" w...

Best PHP timezone list

I have looked over the PHP list of supported timezones, but the whole list is a little long to include in a drop-down menu, for the user to select his or her timezone. Is there a list with the main city/area on that can be used? My geography is terrible and add that to not knowing all the area and which timezone they fall into it could...

How can I simply change the Timezone Offset with Zend_Date?

I'm using Zend_Date to manage dates/times in a scheduling app. The only way I'm able to determine the user's Timezone is via Javascript which only gives a Timezone Offset. Zend_Date only seems to take Timezones in the 'America/New_York' format. Is there a way to get the users timezone in this format or set the Timezone Offset with Ze...

Setting session timezone with spring jdbc oracle

Hello I have a spring/jdbc/oracle 10g application. The Oracle server database timezone is set to GMT + 2 JVM timezone is GMT + 2 (even though it doesn't matter in my case). I have a stored procedure that performs some date operations. The problem is that session timezone is different(GMT) than database timezone even though I do not set...

Get three-letter short timezone name (as opposed to four-letter)?

I've written an Android app that needs the short timezone name in which the handset is currently located. I'm using the following code: String timeZone = Calendar.getInstance().getTimeZone().getDisplayName(false, TimeZone.SHORT); When running in Chicago, this returns "CST". In New York, "EST". In Strasbourg, France, it's returning ...

How to find the timezone with "HNEC" short name?

My Android app is using this code to get the short name of the timezone in which the handset is located. String shortDisplayName = Calendar.getInstance().getTimeZone().getDisplayName(false, TimeZone.SHORT); For my user in Strasbourg, France, shortDisplayName is "HNEC" (I haven't learned yet exactly which locale is in play). I'm tryin...

python : in which timezone is it a specific time right now?

i have users from all timezones, and i want to send out alerts at around 8AM in each users respective timezone. i need a python script that runs every hour [in a cron job] and i need to find out at which timezone it is 8AM right now, and i can use that info to select the users that have to receive the alerts. how do i go about doing t...

Does timezone count differ by locale?

Will TimeZone.getAvailableIDs(); get the same number of timezones regardless of what locale I'm running in? ...