timezone

What's the best way to manage dates across PHP, MySQL, etc?

My server is in Dallas. I'm in New York City.. and both PHP and MySQL have configuration variables for setting the timezone. How do I get them all to work together? What dates should I store in MySQL? How do I get PHP to handle changing the date based on the user's preference? Bear in mind: I don't think I'm ever having PHP explici...

How can I convert datetime microformat to local time in javascript?

I have a page that is currently using the datetime microformat to display a timestamp, but I have only been showing the human-readable time for my own time zone: <abbr class="published" title="2009-01-09T09:16:00-05:00"> Friday, January 9, 2009 at 9:16 am (EST)</abbr> What I'd like to do is rewrite the innerHTML for the abbr tag to be...

Faking time without changing Windows system clock

Does anybody know of a Windows tool to report fake dates/times to a process? Apparently there are Linux programs that can be used to test how the software will react in the future / in a different timezone or to trigger scheduled tasks without actually modifying the system clock. Are there such programs for Windows? ...

Fixing the timezone on Solaris 10

I have no ideas how to fix this. In my /etc/TIMEZONE file the TZ variable has the correct value (Canada/Eastern) and still it's showing a -1 hour lag. Where else should I be looking? ...

How do I enumerate all time zones in .NET?

I would like to have a list of all the time zones available on a Windows Machine. How can I do this in .NET? I know about the TimeZoneInfo.GetSystemTimeZones method, but this returns only the currently selected time zone(s) DateTimeOffset current = DateTimeOffset.Now; ReadOnlyCollection<TimeZoneInfo> timeZones = TimeZo...

How to get timezone value in SSRS

Hi, I have SSRS reports which displays the execution time each time while running the report. I would like to display the timezone value next to it . How do i get that. Thanks, Jaz ...

Testing correct timezone handling

We are working with large amounts of data, all tagged in UTC (in Java). Between reading this data, storing it in a database and getting it out again, it happened, that some data was off one hour during daylight saving time. As UTC has no concept of daylight saving time this was clearly a bug within the software. Once known, it's easy to ...

How to implement timezone in a web application?

I want to implement timezone in my web application. I researched and saw most web app use a GMT dropdown, here is the link to that dropdown http://www.attackwork.com/BlogEntry/6/Time-Zone-Dropdown-Select-List/Default.aspx Then I saw this article suggesting UTC is the way to go when it comes to implement timezone. http://aspnet.4guysfro...

finding the time zone from which a browsers connection to a Web server

I am not into web (client/server)application development, but had this question for sometime - If some web browser (IE/Firefox) makes a connection to some website, is it possible for the web server to find out the timezone of the client, or current local time of the client place, and display the same on the page. If yes then how is the...

understanding results of global.time_zone

Hi I'm looking into ways of changing the time zone of my databases as my userbase is UK based, but my domain is US based. I've researched a number of options including php, PEAR time class, and MySQL functions. To me the simplest (largly because it starts and ends with MySQL) involves changing MySQL's time_zone parameter. In preparat...

Timezone considerations in sql server

Hi, I'm using an sql server 2005 hosted in the states. Soon we will move the db to Europe. I'd like to update the dates in the db to take into account the timezone difference. Is there a good way to do this? Or is it just a case of looping through the dates and adding the timezone offset? ...

JPA/Hibernate store date in UTC time zone

How can I configure JPA/Hibernate to store a date/time in the database as UTC (GMT) time zone? Consider this annotated JPA entity: public class Event { @Id public int id; @Temporal(TemporalType.TIMESTAMP) public java.util.Date date; } If the date is 2008-Feb-03 9:30am Pacific Standard Time (PST), then I want the UTC t...

Best way to compute UTC/local datetime conversion in a WCF client/server application

I've got a client/server application, written in WCF / C#3.5. The server is in my local TimeZone, and clients are spreaded accross the world. My current strategy is to use UTC DateTime everywhere on the server and in the database, and to let the clients handle correctly the UTC DateTimes they receive. This means that everytime the cli...

Best way to handle storing/displaying dates in different timezones in PHP?

I've been reading up on this topic for the past few hours, and I think I've got a handle on it, but I'd like some confirmation. Situation I want a user in, say, California to be able to post a comment that will be stored in MySQL. I then want a user in, say, Texas to be able to view the comment with the post date adjusted to his or her...

How to modify Bind("MyValue") in asp.net

Hi, I'm having headache with Time values and multiple time zones. I'm storing new DateTime values in UTC time, but I face problem when I try to modify them using LinqDataSource and GridView. I can easily show correct time in <ItemTemplate> <asp:Label ID="Label1" runat="server" Text='<%# TimeManager.ToLocalTime((DateTime)Eval("Order...

python time to age part 2, timezones

Following on from my previous question: http://stackoverflow.com/questions/508727/python-time-to-age I have now come across a problem regarding the timezone, turns out that its not always going to be "+0200". So when strptime tries to parse it as such, it throws up an exception. I thought about just chopping off the +0200 with [:-6] or...

std::mktime and timezone info

I'm trying to convert a time info I reveive as a UTC string to a timestamp using std::mktime in C++. My problem is that in / time.h there is no function to convert to UTC, mktime will only return the timestamp as local time. So I need to figure out the timezone offset and take it into account, but I don't find a plattform independent w...

What is the common practice with regards to differentiating between UTC and GMT?

I finally found out the difference between UTC and GMT by making the effort to look it up on Wikipedia today. Technically speaking it appears that GMT != UTC because you do not know if it is UTC or UT1 being referred to. However practically, people use the terms interchangeably to indicate the same timezone. A while ago, I suggested tha...

PHP, how to set timezone??

Hi, I am using PHP and mysql. Scenario: The registration form only required 2 fields. Email and password, and then, first user registered from England, second user from China, etc.. Is there any way to set timezone automatically for different countries of users in PHP? I checked php.net, but no lucks.. ...

ASP.Net Time Localization

I'm working on a site that lets users add calendar entries, on the main page all users can then see these entries with some text saying how long until those entries are current for example Entry 1 : 5 Minutes Entry 2 : 7 Hours Entry 3 : 4 Days The problem I'm having is that everyone could be in different timezones. I've decided I want ...