Search Results

Search found 571 results on 23 pages for 'timezone'.

Page 2/23 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Launching python within python and timezone issue

    - by Gabi Purcaru
    I had to make a launcher script for my django app, and it seems it somehow switches the timezone to GMT (default being +2), and every datetime is two hours behind when using the script. What could be causing that? Here is the launcher script that I use: #!/usr/bin/env python import os import subprocess import shlex import time cwd = os.getcwd() p1 = subprocess.Popen(shlex.split("python manage.py runserver"), cwd=os.path.join(cwd, "drugsworld")) p2 = subprocess.Popen(shlex.split("python coffee_auto_compiler.py"), cwd=os.path.join(cwd)) try: while True: time.sleep(2) except KeyboardInterrupt: p1.terminate() p2.terminate() If I manually run python manage.py runserver, the timezone is +2. If, however, I use this script, the timezone is set to GMT.

    Read the article

  • Changing timezone without changing time in Java

    - by Martin
    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"); long millis = trade_date.getTimeInMillis() - est_tz.getRawOffset(); trade_date.setTimeZone( est_tz ); trade_date.setTimeInMillis( millis ); However, I'm not sure if this solution also takes daylight saving into account. I think it should, because all operations are on UTC time. Any experiences with manipulating time in Java? Better ideas on how to solve this problem?

    Read the article

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

    - by G33kKahuna
    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 communicating to the web service looks like below <completion_time>12:19:38.0000000-04:00</completion_time> with the timezone appended to the end. This is causing the time to be read differently when communicating to a web service at a different timezone. is there anyway to let XmlSerializer skip the timezone? Or any other known workarounds?

    Read the article

  • Iphone - Displaying NSDate values in the debugger with local timezone

    - by Oliver
    Hello, I'm trying to debug my app and there is something very annoying in the debugger : all the NSDate values are displayed in the GMT timezone. So in my debugging process, I lose a lot of time converting by myself all the displayed dates to check if they are correct in the system timezone. As I have a lot of dates at midnight, even the day is displayed "wrong". It's a nightmare. Is there a way to make the debugger display the NSDate values in the iPhone system timezone (not the MacOS one nor GMT) ? I'm at GMT+1 Thank you for your help.

    Read the article

  • How to determine the timezone that an email was sent from in C#

    - by John Sibly
    Can anyone recommend a way to determine the timezone that an email was sent from in C#? Looking at the header information of an email includes information like: Received: from mail-ew0-f211.google.com (123.85.219.211) by UKExchange (10.1.10.99) with Microsoft SMTP Server id 1.2.345.6; Tue, 13 Apr 2010 14:26:24 +0100 Received: by ewy3 with SMTP id 3so288857ewy.6 for <[email protected]>; Tue, 13 Apr 2010 06:26:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.103.213.2 with HTTP; Tue, 13 Apr 2010 06:26:23 -0700 (PDT) X-Originating-IP: [83.244.243.210] Date: Tue, 13 Apr 2010 14:26:23 +0100 Received: by 10.103.3.17 with SMTP id f17mr3087878mui.123.1271165183473; Tue, 13 Apr 2010 06:26:23 -0700 (PDT) There are a number of "Received: from" and "Received: by" keys with a date, time and timezone indicated on the end. Which one of these should I attempt to parse? Is this a reliable way to figure out the sender's timezone, or anyone recommend a better way?

    Read the article

  • TimeZone Issue during DayLight Saving

    - by Viren
    I just been bugged by the Day light saving hours I seem that 3rd November 2013 01:00:00 start EST time Now ever Time I set my time to 3rd November 2013 00:58:xx(some seconds) and run date it give me valid Time zone i.e EDT but even after the time pass 01:00:00 and I still query the date library I still see the Time zone as EDT and not EST have a look at this screenshot You can clearly see the Time zone saying as EDT even when it is EST any one has a clue for this Update There is one other finding I found if I restart my machine I see this More Update Before Restart After Restart

    Read the article

  • Daylight saving time and Timezone best practices

    - by Oded
    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 clock forward or backwards. For instance, one has business rules in an order taking system that depend on the time of the order - if the clock changes, the rules might not be as clear. How should the time of the order be persisted? There is of course an endless number of scenarios - this one is simply an illustrative one. How have you dealt with the daylight saving issue? What assumptions are part of your solution? (looking for context here) As important, if not more so: What did you try that did not work? Why did it not work? I would be interested in programming, OS, data persistence and other pertinent aspects of the issue. General answers are great, but I would also like to see details especially if they are only available on one platform. Summary of answers and other data: (please add yours) Do: Always persist time according to a unified standard that is not affected by daylight savings. GMT and UTC have been mentioned by different people. Include the local time offset (including DST offset) in stored timestamps. Remember that DST offsets are not always an integer number of hours (e.g. Indian Standard Time is UTC+05:30). If using Java, use JodaTime. - http://joda-time.sourceforge.net/ Create a table TZOffsets with three columns: RegionClassId, StartDateTime, and OffsetMinutes (int, in minutes). See answer Check if your DBMS needs to be shutdown during transition. Business rules should always work on civil time. Internally, keep timestamps in something like civil-time-seconds-from-epoch. See answer Only convert to local times at the last possible moment. Don't: Do not use javascript date and time calculations in web apps unless you ABSOLUTELY have to. Testing: When testing make sure you test countries in the Western and Eastern hemispheres, with both DST in progress and not and a country that does not use DST (6 in total). Reference: Olson database, aka Tz_database - ftp://elsie.nci.nih.gov/pub Sources for Time Zone and DST - http://www.twinsun.com/tz/tz-link.htm ISO format (ISO 8601) - http://en.wikipedia.org/wiki/ISO_8601 Mapping between Olson database and Windows TimeZone Ids, from the Unicode Consortium - http://unicode.org/repos/cldr-tmp/trunk/diff/supplemental/windows_tzid.html TimeZone page on WikiPedia - http://en.wikipedia.org/wiki/Tz_database StackOverflow questions tagged dst - http://stackoverflow.com/questions/tagged/dst StackOverflow questions tagged timezone - http://stackoverflow.com/questions/tagged/timezone Other: Lobby your representative to end the abomination that is DST. We can always hope...

    Read the article

  • Python: Figure out local timezone

    - by Adam Matan
    I want to compare UTC timestamps from a log file with local timestamps. When creating the local datetime object, I use something like: >>> local_time=datetime.datetime(2010, 4, 27, 12, 0, 0, 0, tzinfo=pytz.timezone('Israel')) I want to find an automatic tool that would replace thetzinfo=pytz.timezone('Israel') with the current local time zone. Any ideas?

    Read the article

  • Best way to get timezone of user based on area code

    - by niyogi
    Hi folks I'm attempting to get a timezone of a user based on area code information that they provided. I discovered the following resource on maxmind: http://geolite.maxmind.com/download/geoip/api/php/timezone/ I suspect that I could use this with another api that provides the state that an area code belongs to. I'm looking for a simple REST API that provides this info - or a robust scraping routine that achieve the same results. Thanks in advance!

    Read the article

  • .NET timezone information

    - by dotnetrocks
    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 readable by .NET?

    Read the article

  • Python datetime not including DST when using pytz timezone

    - by Jesper
    If I convert a UTC datetime to swedish format, summertime is included (CEST). However, while creating a datetime with sweden as the timezone, it gets CET instead of CEST. Why is this? >>> # Modified for readability >>> import pytz >>> import datetime >>> sweden = pytz.timezone('Europe/Stockholm') >>> >>> datetime.datetime(2010, 4, 20, 16, 20, tzinfo=pytz.utc).astimezone(sweden) datetime(2010, 4, 20, 18, 20, tzinfo=<... 'Europe/Stockholm' CEST+2:00:00 DST>) >>> >>> datetime.datetime(2010, 4, 20, 18, 20, tzinfo=sweden) datetime(2010, 4, 20, 18, 20, tzinfo=<... 'Europe/Stockholm' CET+1:00:00 STD>) >>>

    Read the article

  • Get client timezone (not GMT offset amount) in JS

    - by Rex M
    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 the work already, especially considering the weird exceptions when dealing with time. This question is similar but both the question and the answer are based on the (incorrect) assumption every browser's DateString format includes the name of the timezone - which it does not. That is an implementation detail. So, with that I am currently stuck.

    Read the article

  • Timezone settings in MySQL - Using NOW()?

    - by matt74tm
    SOmewhat related to Doing calculations in MySQL vs PHP Right now, our database assumes that the system time is in UTC and uses that to calculate NOW(). PHP explicitly sets the timezone as UTC (so its impervious to server time zone shifts). An accidental shift of timezones on the server messed this relationship up at the database level and i'm now trying to figure out the ideal congiguration: configure Mysql to be in UTC, but also from the perspective that: our application may be on someone else's server where they might have a different TZ (so i cant set the timezone at the mysql/server level). How do i configure it at the specific database level?

    Read the article

  • My VPS Server's TimeZone always resets on reboot - Why?

    - by GenericTypeTea
    I'm using a VPS running Virtuozzo Containers with Parallels. Every time I reboot it sets the server's TimeZone to GMT+01 Amsterdam. If I change that to GMT+00 London and then reboot, it gets set back to Amsterdam again. Is there any way I can prevent this? I'm also have a very strange issue whereby .Net is reporting that the DateTime.Now as the +01 Amsterdam time instead of +00 GMT, even after I've change it to London's TimeZone. Is there somewhere else I need to change the TimeZone apart from in the Timezone tab under the system clock?

    Read the article

  • Autodetect timezone in Rails given UTC offset and DST

    - by Jose
    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 in the server, I want to select the matching time zone. In Rails, I can get a list of time zones with ActiveSupport::TimeZone.all. Also, I can filter zones by utf offset thanks to the utc_offset method. However, I don't know how to filter the timezones that do/don't observe DST. E.g. suppose a user lives in Amsterdam. Filtering by UTC offset will return Berlin, Belgrado, Madrid, etc timezones, as well as West Central Africa. All of them, but West Central Africa, would be appropriate timezones for a user in Amsterdam (as they provide the same time/date), but I need to filter West Central Africa, which does not perform DST in summer. How can I do this in Rails? Also, are any of my assumptions wrong?

    Read the article

  • Changing timezone in MSYS

    - by d9k
    Hello, how can I change timezone on MSYS+MinGW for Windows if I have only "date" command installed? There are no "tzconfig" or "tzselect" here. When I try $date --set="Apr 01 23:08 UTC+04:00" I receive 19:08 GMT+0 resul. This is very important for me because "make" command always gives me errors about files modified in future.

    Read the article

  • Using client time to calculate timezone

    - by Mike TK
    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!

    Read the article

  • Web service for Timezone based on Location

    - by Dipal Patel
    Hi, Is there any web service available that returns the information of Time zone based on the location name entered. I am preparing the application where in user will enter the place, based on the place entered, I need the information of the timezone (preferably current time and date) of that particular location. Kindly help me. Regards, Dipal

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >