Все вопросы: [timezone]

250 вопросов

3
голосов
2ответов
7956 просмотров

Convert from Local Client System's Time to CST and vice versa

I need to store the datetime in CST timezone regardless of any timezone given. The Clients who access the application are from from various time zones, like IST, CST, EST,... I need to store all the datetime entered by the client in CST timezone to my database. And while retrieving, i need to c...

12
голосов
2ответов
9162 просмотров

Converting UK times (both BST and GMT) represented as strings to UTC (in C#)

I have to use some dates and times from a legacy database. They are represented as strings. Dates are dd/MM/yy. Times are HH:mm. I'd like to convert these to UTC as soon as I pull them from the database. I'm working on US systems, so need a common time. The problem I'm facing is how to convert ...

3
голосов
5ответов
20370 просмотров

Get timezone offset in PHP given a unix timestamp

I have a Unix timestamp that comes from a database that is (unfortunately) in a timezone with a certain of either +3600 or +7200, depending on if it's DST or not. This has never been a problem before, but our website is currently moving to a more international audience and because of Javascript i...

2
голосов
3ответов
644 просмотров

Customizing time zones for Django users using geography

I am working on a Django app that needs to report the local time relative to the user. I would prefer not ask the user to input the time zone directly because I have his address stored in the database. I am only considering American users. Since most states in the USA are in only one time zone...

2
голосов
2ответов
3718 просмотров

.NET 2.0 - TimeZone Conversion

I need help in writing a function which should take a datetime object and target timezone and it should return a datetime object after converting it to the target timezone - WHILE considering Day Light Saving of either target or current timezone. Also, need a method to enumerate all available ti...

4
голосов
1ответов
3274 просмотров

ColdFusion Timezone Support?

Does ColdFusion 8 have any built-in support for handling timezones? We'd like our users to be able to choose a timezone and then have all dates/times on the site adjusted to their locale. Currently we're asking users to set an offset from server time, and it's a headache because they have to go i...

0
голосов
1ответов
424 просмотров

Row based Time Zones in Rails 2.3.4

What is the best way to handle the following situation: We have "admins" who create "events". These events can be nationwide, ie: different time zones. As of now there is a select menu with the current list of US time zones. There is a corresponding column in the database table, for the time zon...

24
голосов
5ответов
69858 просмотров

Is java.util.Date using TimeZone?

I have 2 different computers, each with different TimeZone. In one computer im printing System.currentTimeMillis(), and then prints the following command in both computers: System.out.println(new Date(123456)); --> 123456 stands for the number came in the currentTimeMillis in computer #1. Th...

4
голосов
4ответов
5017 просмотров

How to get UNIX_TIMESTAMP to not offset a datetime field when in different time zones?

I have built a small forum where users can post messages. My server is in the United States, but the userbase for the forum is in Taiwan (+15hrs). When someone posts to the form, I store the time in my mySQL database in the format YYYY-MM-DD HH:MM:SS. When I look in the database, the time disp...

2
голосов
1ответов
121 просмотров

UTC within Site

I am working on a website that will only be available via the intranet but is a website that is Australia wide ONLY. The thing is, I have been asked to look into making the site UTC and was wondering how I could go about displaying a clock or determing which timezone the site in running in and s...

3
голосов
1ответов
1521 просмотров

Django timezone mess

I'm working on a localized Django app with a simple forum. Some posts' timestamps show up as if they were posted 7 hours earlier. What's weird is that it happens to some users, sometimes (a user may post once and it's OK, posts again and it's wrong). settings.py: TIME_ZONE = 'Europe/Prague' LAN...

4
голосов
5ответов
14544 просмотров

How to display local time with PHP

Our server is set to GMT time so the hour does not keep jumping around in spring and autumn. However, during summer time, it is annoying that all the times are displayed an hour out. How do I get and display the time, taking into account the local timezone in PHP (especially when the server thin...

3
голосов
2ответов
1866 просмотров

Rails app - how to enter events in local time zone

I am working on a Rails app that displays a sports schedule (in a basic table). Each game/event is a db table row. The customer wants all the events to display in chronological order but to also display the time in the event's local timezone. How can I add a timezone selector to the New action...

1
голосов
2ответов
963 просмотров

Correct Date and Time Columns in MySQL

I have a timezone mismatch I need to correct in a table. All dates and times before unix timestamp 1253568477 need to have 5 hours added to their values to make them equal GMT. I have the following columns... date (data type date), off by -5 hours time (data type time), off by -5 hours timest...

1
голосов
4ответов
2700 просмотров

custom and dynamic time zones in java

I have a JSE 6 application that runs on an OS with a custom timezone. TimeZone.getDefaultTimeZone() returns 'GMT' as the timezone altough this is not correct. Does java supports custom time zones? Another problem is that the time zone configuration (daylight saving time transitions) could chang...

0
голосов
1ответов
272 просмотров

Java does not seem to accept Romance as timezone alias. What should it be?

I'm trying to convert a date string from another application in Groovy. Something like "18-sep-2009 10:25:11 Romance Daylight Time" It looks like Java does not understand the Romance as timezone alias. "18-sep-2009 10:25:11 Pacific Daylight Time" works fine. Is there a fix for this other than ...

5
голосов
3ответов
6637 просмотров

Adjusting time zone in PHP with DateTime / DateTimeZone

There's a lot of info on doing time zone adjustments in PHP, but I haven't found an answer for specifically what I want to do due to all the noise. Given a time in one timezone, I want to convert it to the time in another timezone. This is essentially what I want to do, but I need to be able t...

0
голосов
2ответов
239 просмотров

how to overwrite the timezone of the server in a sub application

This is a quicky, what do I need to setup a different timzone in my application than that setup on IIS All i want is to show a specific date in AESP rather than SPT, ist here a way in C# .NET 3.5?

0
голосов
3ответов
1092 просмотров

TimeZone information in .NET 2.0

Could anybody suggest a third party library in .net which could provide Time Zone information and meet these requirements Which supports .NET 2.0 not .net 3.5 Note: (.NET 3.5 has a class called TimeZoneInfo). Mono compatible Ta, Rajeesh

6
голосов
1ответов
445 просмотров

TimeZone in C#?

How to populate the timezone in a drop down box?

0
голосов
3ответов
2554 просмотров

How to deal with time zones in a Rails app with events

I have a Rails app for bands. Bands can import their shows which all occur in different time zones. It seems like a ton of work to store these events in UTC. I would have to figure out the time zone for any show created and then convert back to the show's local time zone when displaying to the...

23
голосов
2ответов
9755 просмотров

pytz: Why is normalize needed when converting between timezones?

I'm reading the not so complete pytz documentation and I'm stuck on understand one part of it. Converting between timezones also needs special attention. This also needs to use the normalize method to ensure the conversion is correct. >>> utc_dt = utc.localize(datetime.utcfromtimes...

2
голосов
5ответов
1114 просмотров

Weird time inconsistencies between production and development

For some reason times are appearing differently in development (my local Mac) and production (Heroku). Take a look: (Just prior to doing this I did a heroku db:pull, so the databases should be identical) Production (Heroku) >> Annotation.last.id => 2028 >> Annotation.last.created...

0
голосов
1ответов
207 просмотров

PHP time ahead of MySQL time

I run PHP and MySQL on the same machine, but both report different times. I set the timezones by the following methods: PHP: date_default_timezone_set('Asia/Kuala_Lumpur'); MySQL: SET time_zone = "Asia/Kuala_Lumpur"; The difference between two times is always exactly 24 seconds. Any idea ...

66
голосов
10ответов
84215 просмотров

Display the time in a different time zone

Is there an elegant way to display the current time in another time zone? I would like to have something with the general spirit of: cur = <Get the current time, perhaps datetime.datetime.now()> print("Local time {}".format(cur)) print("Pacific time {}".format(<something like cur.tz(...

2
голосов
2ответов
1302 просмотров

Displaying tweets in my website using my timezone

I am able to display my tweets in my website using the JavaScript below. window.onload = function() { var siteName = 'xyz'; $.getJSON( 'http://search.twitter.com/search.json?callback=?&rpp=20&q=from:' + siteName, function(data) { $.each(data, function(...

11
голосов
7ответов
30276 просмотров

Is there a way to get a timeZone with (only) a country code (valid ISO-3166 code)?

I'm trying to get a TimeZone for a user. For this I have a country code which is a valid ISO Country Code. These codes are the upper-case, two-letter codes as defined by ISO-3166. You can find a full list of these codes at a number of sites, such as: http://www.chemie.fu-berlin.de/diverse/doc/I...

2
голосов
1ответов
1823 просмотров

TZ Var to Java TimeZone?

I need to convert from the Unix TZ environment variable of the form: stdoffset[dst[offset][,start[/time],end[/time]]] into a Java TimeZone object. For example, convert AEST-10AEDT-11,M10.1.0/02:00:00,M4.1.0/03:00:00 into a Java TimeZone object that represents "Australia\Sydney". Before I go ...

15
голосов
1ответов
19153 просмотров

How do I use GMT times in postgresql?

We are running about in our java code with GregorianCalendar. We would like to persist these in our postgresql database as GMT +0 time in timestamp type columns, but we're not sure how to go about it. Should the fields be with time stamp or without? By a similar token which "current" time postgre...

51
голосов
4ответов
42740 просмотров

pytz localize vs datetime replace

I'm having some weird issues with pytz's .localize() function. Sometimes it wouldn't make adjustments to the localized datetime: .localize behaviour: >>> tz <DstTzInfo 'Africa/Abidjan' LMT-1 day, 23:44:00 STD> >>> d datetime.datetime(2009, 9, 2, 14, 45, 42, 91421) >...