3
votes
1answer
30 views

How to set the offset of timestamps in a pandas dataframe?

I'm having a DataFrame with two columns. One column is filled with timestamps, the other column contains the offset in hours to UTC of the timestamp in the same row. The DataFrame looks like this: ...
2
votes
1answer
30 views

Is a specific timezone using DST right now?

How would I get my python script to check whether or not a specific timezone that is stored in a variable using DST right now? My server is set to UTC. So I have say for instance zonename = ...
3
votes
1answer
41 views

Change timezone of date-time column in pandas and add as hierarchical index

I have data with a time-stamp in UTC. I'd like to convert the timezone of this timestamp to 'US/Pacific' and add it as a hierarchical index to a pandas DataFrame. I've been able to convert the ...
0
votes
4answers
36 views

Strip down %Z to only return the timezone not daylight savings in python

I have some code as shown below, but the timezone %Z is returning: 01:04:48 GMT Daylight Time I need it return: 01:04:48 GMT import time timenew = time.strftime('%H:%M:%S %Z') print timenew ...
1
vote
1answer
15 views

Facebook event start_time sometimes in user time, others in local event time

I am trying to convert the Facebook start_time of time. As per Facebook's documentation, Facebook uses ISO-8601 strings to describe precise time with offset from UTC of format: ...
2
votes
2answers
32 views

Losing DST information using pytz and UTC conversions

Maybe this is a 4am bug, but I think I'm doing everything right, but it doesn't appear as though DST is translating from the UTC timestamp to the localized datetime. >>> from datetime import ...
0
votes
1answer
28 views

django datetimefield timezone

Ok, so I am reading a ton of posts about how it is a utc time and use pytz to convert the time so it is useful. I can do all that, but it seems to be built into Django as on the admin page, if I ...
0
votes
1answer
34 views

pytz.timezone('Asia/Chongqing') is behaving strangely

I am writing some Python (Python 2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)] on win32, Windows 7) code which needs to handle timezones. For this I am using the pytz library ...
2
votes
1answer
90 views

How to print datetime according to user's time zone setting

I'm user GAE's ndb for datastore, and have the date property defined like class GuestMessage(ndb.Model): date = ndb.DateTimeProperty(auto_now_add=True) So now I can print it easily with ...
1
vote
1answer
41 views

Expression of timezone offset - clarification appreciated

Something I'm currently working on requires localised times for users around the world. All datetimes are stored as UTC, so converting them is easy enough and we have a known, safe, point of ...
0
votes
2answers
65 views

How to convert datetime.time from UTC to different timezone?

I have variable which holds time which is of type datetime.time in UTC, I wanted it to convert to some other timezone. we can convert timezones in datetime.datetime instance as shown in this SO link ...
0
votes
2answers
75 views

Django and Timezones: how to render aware datetime as a naive one in template (with pytz)

I have those models: class TimeZone(models.Model): name = models.CharField(max_length = 40, unique = True, editable = False) def tz(self): return pytz.timezone(str(self.name)) class ...
4
votes
2answers
113 views

How can I convert windows timezones to timezones pytz understands?

In a windows python environment I can get the local timezone like this, but it's not usable with pytz: >>> import win32timezone >>> win32timezone.TimeZoneInfo.local() ...
2
votes
2answers
75 views

What's wrong with this python timezone conversion?

I want to convert a datetime with US/Eastern timezone to Budapest/Europe timezone this way: import pytz from datetime import datetime ET = pytz.timezone('US/Eastern') CET = ...
1
vote
1answer
34 views

Django: Set datetime in views to utc+1

I have checked around a bit, both here and Google, without finding an exact answer to what I'm looking for. I'm currently working on a Django-project and I seem to live in one of those areas where ...

1 2 3 4 5 15
15 30 50 per page