Anyone using settings.TIME_ZONE=None? (considering remove support for it)

2016-10-14 Thread Tim Graham
I'm not sure if there's a compelling use case for settings.TIME_ZONE=None 
these days. If you're using it, could you please describe your use case on 
the django-developers 
thread: 
https://groups.google.com/d/topic/django-developers/OAV3FChfuPM/discussion 
Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/646c7d2c-6835-4a28-ad58-306a45431a7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: settings.TIME_ZONE

2009-12-06 Thread XtraGreen
Ok, turns out when I set TIME_OUT to 'UTC' it was storing and
retrieving the dates correctly.  But when I was viewing the dates in
psql and pgAdmin III it was showing the dates using my system's time
zone data.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2009-12-06 Thread XtraGreen
Not only do I have settings.TIME_ZONE set to 'UTC', I'm also creating
datetime objects via utcfromtimestamp() as follows:

field = datetime.datetime.utcfromtimestamp(time.time())

So I figured they would be going into the database as UTC anyway.
When I figured out that they were showing UTC-6 in the database I
changed the settings.TIME_ZONE, but that doesn't seem to change
anything for new records going into the database.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2009-12-06 Thread XtraGreen


On Dec 6, 9:21 pm, Graham Dumpleton 
wrote:
> Some explanation of this issue in:
>
>  http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_...
>
> If using Apache/mod_wsgi, delegate Python web application instances
> with specific timezone, locale, lang requirements to a separate
> process using mod_wsgi daemon mode.
>
> Graham

In this case, I'm using Flup with one interpreter per process running
in front of lighttpd.

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2009-12-06 Thread XtraGreen

On Dec 6, 8:39 pm, Brian Neal  wrote:
> What is your server setup? Apache on Linux? mod_python or mod_wsgi?
> Are you running anything else on your server like PHP apps? The
> timezone setting is process-wide, so depending on how you deployed
> your server another application could be overwriting you.
>
> BN

Using Linux, Postgresql and Lighttpd in front of Flup.  The Flup
process is just serving one site (one settings.py).

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2009-12-06 Thread Graham Dumpleton


On Dec 7, 1:39 pm, Brian Neal <bgn...@gmail.com> wrote:
> On Dec 6, 7:40 pm, XtraGreen <stargazer...@gmail.com> wrote:
>
> > I've changed settings.TIME_ZONE to 'UTC' and restarted my server but
> > when I create records (postgresql) they're not UTC, they're 'America/
> > Chicago' (-6) in the table.
>
> > Am I missing something or is settings.TIME_ZONE useless?
>
> What is your server setup? Apache on Linux? mod_python ormod_wsgi?
> Are you running anything else on your server like PHP apps? The
> timezone setting is process-wide, so depending on how you deployed
> your server another application could be overwriting you.

Some explanation of this issue in:

  
http://code.google.com/p/modwsgi/wiki/ApplicationIssues#Timezone_and_Locale_Settings

If using Apache/mod_wsgi, delegate Python web application instances
with specific timezone, locale, lang requirements to a separate
process using mod_wsgi daemon mode.

Graham

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2009-12-06 Thread Brian Neal
On Dec 6, 7:40 pm, XtraGreen <stargazer...@gmail.com> wrote:
> I've changed settings.TIME_ZONE to 'UTC' and restarted my server but
> when I create records (postgresql) they're not UTC, they're 'America/
> Chicago' (-6) in the table.
>
> Am I missing something or is settings.TIME_ZONE useless?

What is your server setup? Apache on Linux? mod_python or mod_wsgi?
Are you running anything else on your server like PHP apps? The
timezone setting is process-wide, so depending on how you deployed
your server another application could be overwriting you.

BN

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




settings.TIME_ZONE

2009-12-06 Thread XtraGreen
I've changed settings.TIME_ZONE to 'UTC' and restarted my server but
when I create records (postgresql) they're not UTC, they're 'America/
Chicago' (-6) in the table.

Am I missing something or is settings.TIME_ZONE useless?

--

You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.




Re: settings.TIME_ZONE

2008-09-03 Thread lingrlongr

It turns out its my stupid host that's not handling the dates
properly.  I wrote a Python script and tested:

#! /usr/bin/env python

import os
import datetime

def do_test(tz):
   if tz != '':
  os.environ['TZ'] = tz
   print '%20s:  %s' % (tz, datetime.datetime.today())

[do_test(tz) for tz in ('', 'America/New_York', 'America/Denver')]

This outputs:

:  2008-09-03 17:28:43.784919
America/New_York:  2008-09-03 23:28:43.784996
America/Denver:  2008-09-03 23:28:43.785047

As you can see, it don't workee.  I then discovered the timezone "EST
+05EDT,M4.1.0,M10.5.0", here: http://docs.python.org/lib/module-time.html
and gave that a try.  Here's the output now correctly showing 2 hours
difference:

:  2008-09-03 17:32:54.726285
America/New_York:  2008-09-03 23:32:54.726363
America/Denver:  2008-09-03 23:32:54.726409
EST+05EDT,M4.1.0,M10.5.0:  2008-09-03 19:32:54.726451

So if there's any Westhosters out there, you'll benefit from this.


On Aug 25, 11:30 pm, lingrlongr <[EMAIL PROTECTED]> wrote:
> Here's more info:
>
> $ ./manage.py shell
> Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> (InteractiveConsole)>>> from datetime import datetime
> >>> datetime.today()
>
> datetime.datetime(2008, 8, 26, 3, 25, 47, 588753)
>
> $ python
> Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> from datetime import datetime
> >>> datetime.today()
>
> datetime.datetime(2008, 8, 25, 21, 26, 21, 383524)
>
> Keith
>
> On Aug 25, 11:11 pm, lingrlongr <[EMAIL PROTECTED]> wrote:
>
> > I'm a little confused about theTIME_ZONEsetting in settings.py.  I
> > originally had it set to 'America/New_York', because that's the time
> > zone where I'm located, but I noticed the times were ~4 hours off when
> > I would save an object that had a DateTimeField(auto_now_add=True)
> > field in the model.  Instead I tried to set theTIME_ZONEvalue to
> > where the web server was, Utah, so I used 'America/Denver'.
>
> > I saved an object while configured for Denver, timestamp was for
> > 2:40am.  I changed the setting back to New_York and saved another
> > object, the the timestamp was for 2:52am.  Local time for me was
> > ~10pm.
>
> > Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
> > [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
> > Type "help", "copyright", "credits" or "license" for more information.>>> 
> > import datetime
> > >>> datetime.datetime.today()
>
> > datetime.datetime(2008, 8, 25, 21, 9, 15, 497672)
>
> > $ date
> > Mon Aug 25 21:09:45 MDT 2008
>
> > I would like the times to shown as Eastern Time zone.  What should I
> > set theTIME_ZONEsetting to?
>
> > Keith
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: settings.TIME_ZONE

2008-08-25 Thread lingrlongr

Here's more info:

$ ./manage.py shell
Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> from datetime import datetime
>>> datetime.today()
datetime.datetime(2008, 8, 26, 3, 25, 47, 588753)


$ python
Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import datetime
>>> datetime.today()
datetime.datetime(2008, 8, 25, 21, 26, 21, 383524)

Keith

On Aug 25, 11:11 pm, lingrlongr <[EMAIL PROTECTED]> wrote:
> I'm a little confused about the TIME_ZONE setting in settings.py.  I
> originally had it set to 'America/New_York', because that's the time
> zone where I'm located, but I noticed the times were ~4 hours off when
> I would save an object that had a DateTimeField(auto_now_add=True)
> field in the model.  Instead I tried to set the TIME_ZONE value to
> where the web server was, Utah, so I used 'America/Denver'.
>
> I saved an object while configured for Denver, timestamp was for
> 2:40am.  I changed the setting back to New_York and saved another
> object, the the timestamp was for 2:52am.  Local time for me was
> ~10pm.
>
> Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
> [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.>>> 
> import datetime
> >>> datetime.datetime.today()
>
> datetime.datetime(2008, 8, 25, 21, 9, 15, 497672)
>
> $ date
> Mon Aug 25 21:09:45 MDT 2008
>
> I would like the times to shown as Eastern Time zone.  What should I
> set the TIME_ZONE setting to?
>
> Keith
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



settings.TIME_ZONE

2008-08-25 Thread lingrlongr

I'm a little confused about the TIME_ZONE setting in settings.py.  I
originally had it set to 'America/New_York', because that's the time
zone where I'm located, but I noticed the times were ~4 hours off when
I would save an object that had a DateTimeField(auto_now_add=True)
field in the model.  Instead I tried to set the TIME_ZONE value to
where the web server was, Utah, so I used 'America/Denver'.

I saved an object while configured for Denver, timestamp was for
2:40am.  I changed the setting back to New_York and saved another
object, the the timestamp was for 2:52am.  Local time for me was
~10pm.

Python 2.5 (r25:51908, Mar 23 2007, 14:22:20)
[GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import datetime
>>> datetime.datetime.today()
datetime.datetime(2008, 8, 25, 21, 9, 15, 497672)

$ date
Mon Aug 25 21:09:45 MDT 2008

I would like the times to shown as Eastern Time zone.  What should I
set the TIME_ZONE setting to?

Keith
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---