Timestamp + Interval time zone issues

2010-07-28 Thread Mike Ginsburg

So I have pg 8.4.3 installed, with a database set to EST5EDT time zone.

When I run SELECT NOW() I get
07/28/2010 14:27:07.767286 EDT

showing that the timezone is properly set up.

When I then try to add an interval to a statically entered time stamp, 
it gets all strange:
SELECT '01/03/2011 16:00:00-04'::timestamp with time zone + '-1 
hour'::interval;
   ?column?
-

01/03/2011 14:00:00 EST

Any idea why the adding of the interval is converting the result into 
EST instead of EDT?


Mike Ginsburg
Collaborative Fusion, Inc.
mginsb...@collaborativefusion.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Timestamp + Interval time zone issues

2010-07-28 Thread Chuck Swiger
Hi--

On Jul 28, 2010, at 11:28 AM, Mike Ginsburg wrote:
 When I then try to add an interval to a statically entered time stamp, it 
 gets all strange:
 SELECT '01/03/2011 16:00:00-04'::timestamp with time zone + '-1 
 hour'::interval;
   ?column?-
 01/03/2011 14:00:00 EST
 
 Any idea why the adding of the interval is converting the result into EST 
 instead of EDT?

I'd image this is because Jan 3 is in EST:

% date -j '01031600'
Sun Jan  3 16:00:00 EST 2010

Regards,
-- 
-Chuck

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Timestamp + Interval time zone issues

2010-07-28 Thread Jon Radel

On 7/28/10 2:28 PM, Mike Ginsburg wrote:


So I have pg 8.4.3 installed, with a database set to EST5EDT time zone.

When I run SELECT NOW() I get
07/28/2010 14:27:07.767286 EDT

showing that the timezone is properly set up.

When I then try to add an interval to a statically entered time stamp, 
it gets all strange:
SELECT '01/03/2011 16:00:00-04'::timestamp with time zone + '-1 
hour'::interval;

   ?column?-
01/03/2011 14:00:00 EST

Any idea why the adding of the interval is converting the result into 
EST instead of EDT?
Because Daylight Saving Time will be over by 1/3/2011?   Does it still 
happen if you use a

statically entered time stamp that's during Daylight Saving?

--

--Jon Radel
j...@radel.com




Re: Timestamp + Interval time zone issues

2010-07-28 Thread Mike Ginsburg

Jon Radel wrote:

On 7/28/10 2:28 PM, Mike Ginsburg wrote:


So I have pg 8.4.3 installed, with a database set to EST5EDT time zone.

When I run SELECT NOW() I get
07/28/2010 14:27:07.767286 EDT

showing that the timezone is properly set up.

When I then try to add an interval to a statically entered time 
stamp, it gets all strange:
SELECT '01/03/2011 16:00:00-04'::timestamp with time zone + '-1 
hour'::interval;

   ?column?-
01/03/2011 14:00:00 EST

Any idea why the adding of the interval is converting the result into 
EST instead of EDT?
Because Daylight Saving Time will be over by 1/3/2011?   Does it still 
happen if you use a

statically entered time stamp that's during Daylight Saving?
Well now I just feel dumb.  Using the same query, but within daylight 
savings produces the expected result. Thanks for the help.


Mike Ginsburg
Collaborative Fusion, Inc.
mginsb...@collaborativefusion.com

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Squirrel Mail Time Zone Errors

2010-07-10 Thread Chris Maness
Is anyone getting these errors when logging in to Squirrel Mail?

Warning: strtotime() [function.strtotime]: It is not safe to rely on
the system's timezone settings. You are *required* to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this
warning, you most likely misspelled the timezone identifier. We
selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
/usr/local/www/squirrelmail/functions/date.php  on line 428

Warning: date() [function.date]: It is not safe to rely on the
system's timezone settings. You are *required* to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this
warning, you most likely misspelled the timezone identifier. We
selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
/usr/local/www/squirrelmail/functions/date.php on line 95

Warning: date() [function.date]: It is not safe to rely on the
system's timezone settings. You are *required* to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this
warning, you most likely misspelled the timezone identifier. We
selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
/usr/local/www/squirrelmail/functions/date.php on line 347

Warning: date() [function.date]: It is not safe to rely on the
system's timezone settings. You are *required* to use the
date.timezone setting or the date_default_timezone_set() function. In
case you used any of those methods and you are still getting this
warning, you most likely misspelled the timezone identifier. We
selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
/usr/local/www/squirrelmail/functions/date.php on line 289

These things go on forever in the in box.

Thanks,
Chris Maness
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Squirrel Mail Time Zone Errors

2010-07-10 Thread Amitabh Kant
On Sat, Jul 10, 2010 at 9:01 PM, Chris Maness ch...@chrismaness.com wrote:

 Is anyone getting these errors when logging in to Squirrel Mail?

 Warning: strtotime() [function.strtotime]: It is not safe to rely on
 the system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php  on line 428

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 95

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 347

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 289

 These things go on forever in the in box.

 Thanks,
 Chris Maness


Have you recently upgraded to php 5.3 recently? You might need to set the
time zone either in php.ini file or set the same on the script page at the
top using date_default_timezone_set('
America/Los_Angeles');

Amitabh Kant
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Squirrel Mail Time Zone Errors

2010-07-10 Thread Chris Maness
On Sat, Jul 10, 2010 at 8:43 AM, Amitabh Kant amitabhk...@gmail.com wrote:
 On Sat, Jul 10, 2010 at 9:01 PM, Chris Maness ch...@chrismaness.com wrote:

 Is anyone getting these errors when logging in to Squirrel Mail?

 Warning: strtotime() [function.strtotime]: It is not safe to rely on
 the system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php  on line 428

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 95

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 347

 Warning: date() [function.date]: It is not safe to rely on the
 system's timezone settings. You are *required* to use the
 date.timezone setting or the date_default_timezone_set() function. In
 case you used any of those methods and you are still getting this
 warning, you most likely misspelled the timezone identifier. We
 selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in
 /usr/local/www/squirrelmail/functions/date.php on line 289

 These things go on forever in the in box.

 Thanks,
 Chris Maness


 Have you recently upgraded to php 5.3 recently? You might need to set the
 time zone either in php.ini file or set the same on the script page at the
 top using date_default_timezone_set('America/Los_Angeles');

 Amitabh Kant


Instant fix.  Thank You.

Chris Maness
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How to make a process detect time zone change?

2010-03-16 Thread Peter Steele
We have a system controlled through a Java GUI and one of the commands provided 
in the GUI is to change the date/time, including the time zone. When the time 
zone is changed the FreeBSD system immediately recognizes the change (that is, 
the date command from the command line shows the correct time and time zone). 
However, our running C apps do not recognize that a time zone change has 
occurred unless they are restarted. What's the proper way to inform an active 
process that a time zone change has occurred? I've tried tzset() and 
tzsetwall() but neither seem to do the trick. The only thing I've found that 
works is to restart the process, and that's not really a solution.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How to make a process detect time zone change?

2010-03-16 Thread Mark Shroyer
On 3/16/2010 11:23 AM, Peter Steele wrote:
 We have a system controlled through a Java GUI and one of the
 commands provided in the GUI is to change the date/time, including
 the time zone. When the time zone is changed the FreeBSD system
 immediately recognizes the change (that is, the date command from the
 command line shows the correct time and time zone). However, our
 running C apps do not recognize that a time zone change has occurred
 unless they are restarted. What's the proper way to inform an active
 process that a time zone change has occurred? I've tried tzset() and
 tzsetwall() but neither seem to do the trick. The only thing I've
 found that works is to restart the process, and that's not really a
 solution.

I think I have a solution.  First I tried the following code:

 #include stdio.h
 #include time.h
 #include unistd.h

 int main(int argc, char* argv[])
 {
 time_t now;
 struct tm localNow;

 for (;;) {
 time(now);
 tzsetwall();
 localtime_r(now, localNow);
 printf(%02d:%02d:%02d %s\n, localNow.tm_hour,
   localNow.tm_min,
   localNow.tm_sec,
   localNow.tm_zone);
 sleep(1);
 }

 return 0;
 }

While this was running I set /etc/localtime to a different time zone,
and sure enough, my process failed to pick up the new zone until I
killed and restarted it.  However, when I passed the environment
variable TZ=/etc/localtime to the program:

 $ env TZ=/etc/localtime ./a.out
 06:11:30 MET
 06:11:31 MET
 06:11:32 MET
 06:11:33 MET
 01:11:34 EDT
 01:11:35 EDT
 01:11:36 EDT
 ^C$

So there it is: set TZ=/etc/localtime and use tzsetwall() to update the
time zone within the process.  In my reading, the tzsetwall(3)
documentation does seem to imply tzsetwall() would check /etc/localtime
even if TZ isn't set, but apparently this isn't the case; maybe the man
page could be clarified on this point?

Anyway, I hope this helps...

-- 
Mark Shroyer
http://markshroyer.com/contact/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


How is time zone change signalled?

2009-08-07 Thread Peter Steele
We have a suite of applications with a Java GUI controlling everything.
One of the actions the user can perform is to set the time zone. We do
this through our Java application and update the /etc/localtime as
required. We also make an API call to tell the JVM that the time zone as
changed, and from the perspective of the Java app, the time zone is
changed correctly (the timestamps for example in our log files reflect
the change). Likewise, after the user performs this action, running
date on one of our systems shows that the time zone has been changed
as requested. 

 

The problem is with our C applications. They continue to operate with
the old time zone, so things like timestamps in log files are not in
sync with the timestamps in the Java app log files. If we stop and
restart the C apps they pick up the time zone change. However, we don't
want to take this extreme approach. We want the Java app to signal to
the C applications that the time zone has changed. However, I've
experimented with the various time zone related calls and I cannot
figure out what call is needed to make the C applications pick up the
time zone change. I've tried setting the environment variable TZ to the
new time zone and this doesn't seem to work, and I've tried calling
tzset() and tzsetwall(). In each case after I make these calls the
function localtime() does not return the same time base as the Java
application.

 

I'm obviously missing something the key here. What function call do I
need to make to get the C apps to pick up the time zone change?

 

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How is time zone change signalled?

2009-08-07 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Steele wrote:
[...]
  
 
 The problem is with our C applications. They continue to operate with
 the old time zone, so things like timestamps in log files are not in
 sync with the timestamps in the Java app log files. If we stop and
 restart the C apps they pick up the time zone change. However, we don't
 want to take this extreme approach. We want the Java app to signal to
 the C applications that the time zone has changed. However, I've
 experimented with the various time zone related calls and I cannot
 figure out what call is needed to make the C applications pick up the
 time zone change. I've tried setting the environment variable TZ to the
 new time zone and this doesn't seem to work, and I've tried calling
 tzset() and tzsetwall(). In each case after I make these calls the
 function localtime() does not return the same time base as the Java
 application.
 

Hi Peter,

Did you try unsetting TZ and then calling tzset()?  The man page implies
that doing so will force a reread of /etc/localtime
(http://www.freebsd.org/cgi/man.cgi?query=tzsetsourceid=opensearch):

The tzset() function initializes time conversion information used by
the library routine localtime(3).  The environment variable TZ specifies
how this is done.

If TZ does not appear in the environment, the best available
approximation to local wall clock time, as specified by the
tzfile(5)-format file /etc/localtime is used.

I haven't tested it, though, and I'm no timezone expert, so I may be
completely off-base!

Cheers,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKfEAG0sRouByUApARAkFQAKCq3PdqsoJ4aMMnNcoUgwHwOcOlLACfczQ/
vzfWIYV/n7TEgq6jIgCnVnE=
=6Bwv
-END PGP SIGNATURE-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: How is time zone change signalled?

2009-08-07 Thread Peter Steele
Did you try unsetting TZ and then calling tzset()?  The man page
implies that doing so will force a reread of /etc/localtime
(http://www.freebsd.org/cgi/man.cgi?query=tzsetsourceid=opensearch):

The tzset() function initializes time conversion information used by
the library routine localtime(3).  The environment variable TZ specifies
how this is done.

If TZ does not appear in the environment, the best available
approximation to local wall clock time, as specified by the
tzfile(5)-format file /etc/localtime is used.

I haven't tested it, though, and I'm no timezone expert, so I may be
completely off-base!

Yes, I've tried the tzset function. I'm basically doing the equivalent
of these steps after the Java app changes time zone and updates
/etc/localtime:

time_t date = time(NULL);
unsetenv(TZ);
tzset();
printf(time zone is %s/%s, tzname[0], tzname[1]);
struct tm* locTime = localtime(date);
printf(%02d:%02d:%02d, locTime-tm_hour, locTime-tm_min,
locTime-tm_sec);

The time printed is still based on the old time zone though. The tzname
variable that is set by tzset() still shows for example EDT even if I
have just changed the time zone to PDT. If I stop and restart the C app,
the time is correct, and tzname is then PDT instead of EDT.

I'm very puzzled on what I'm supposed to do to kick start the C time
zone. We do not want to have to restart our C apps for something as
trivial as this.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: How is time zone change signalled?

2009-08-07 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Peter Steele wrote:
 Did you try unsetting TZ and then calling tzset()?  The man page
 implies that doing so will force a reread of /etc/localtime
 (http://www.freebsd.org/cgi/man.cgi?query=tzsetsourceid=opensearch):

 The tzset() function initializes time conversion information used by
 the library routine localtime(3).  The environment variable TZ specifies
 how this is done.
 If TZ does not appear in the environment, the best available
 approximation to local wall clock time, as specified by the
 tzfile(5)-format file /etc/localtime is used.
 I haven't tested it, though, and I'm no timezone expert, so I may be
 completely off-base!
 
 Yes, I've tried the tzset function. I'm basically doing the equivalent
 of these steps after the Java app changes time zone and updates
 /etc/localtime:
 
   time_t date = time(NULL);
   unsetenv(TZ);
   tzset();
   printf(time zone is %s/%s, tzname[0], tzname[1]);
   struct tm* locTime = localtime(date);
   printf(%02d:%02d:%02d, locTime-tm_hour, locTime-tm_min,
 locTime-tm_sec);
 
 The time printed is still based on the old time zone though. The tzname
 variable that is set by tzset() still shows for example EDT even if I
 have just changed the time zone to PDT. If I stop and restart the C app,
 the time is correct, and tzname is then PDT instead of EDT.
 
 I'm very puzzled on what I'm supposed to do to kick start the C time
 zone. We do not want to have to restart our C apps for something as
 trivial as this.
 

Hi Peter,

Ok, just wanted to make sure you tried unsetting TZ before calling
tzset().  I couldn't tell from your original message.  In any case, the
man page makes it sound like it should work.

I'm really rusty on C programming, but I had a look in
/usr/src/lib/libc/stdtime/localtime.c, and it appears that
/etc/localtime should be reloaded, although this comment at the
beginning of tzload() gives me pause:

/* XXX The following is from OpenBSD, and I'm not sure it is correct */

I wonder if you'd get more insight by asking the question in -hackers.
Perhaps there are some libc experts listening there.

Cheers,
Greg
- --
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFKfH510sRouByUApARAjbKAJ9hjsl4X28JjVeZu/3RddR083/+ewCghkUY
DF+xiTuRUKKnP1wlySTeMsc=
=oZqF
-END PGP SIGNATURE-

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


RE: How is time zone change signalled?

2009-08-07 Thread Peter Steele
I wonder if you'd get more insight by asking the question in -hackers.
Perhaps there are some libc experts listening there.

Well, I still haven't found the magic so I'll try my luck there...

Thanks for the feedback.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


EDT time zone change in 2007

2007-01-11 Thread Paul Khavkine

Hi.

There's has been changes to how Daylight Saving Time is observed in eastern
canada in 2007:

http://www.timetemperature.com/tzca/daylight_saving_time_canada.shtml


Is there anything that needs to be done to FreeBSD to reflect the changes ?


Thanx
Paul
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time zone isn't displaying right one with 'tzsetup'

2006-08-23 Thread Matthew Seaman
jdow wrote:
 From: Robert Gabaree [EMAIL PROTECTED]

 I tried to update my new server to the new time zone by running 
 'tzsetup' and selecting Eastern.  However, instead of showing 11:45, 
 it shows 6:45 - 5 hours later.  I even tried to do a 'cp /usr/share/
 zoneinfo/EST5EDT /etc/localtime but it didn't help.  What can I do 
 to fix it?
 
 What time does your BIOS say? And did you tell Linux which time zone
 the BIOS thinks it is in?
 
 There is a UTC=true or UTC=false line in /etc/sysconfig/clock you
 might investigate.

Yeah, but this is *freebsd*-questions, so telling the OP how to fix
a Linux box is not very coherent.

You could well be exactly right on the diagnosis of the problem though:
the CMOS clock on the motherboard can either be set to run UTC or it can
be set to the local wall-clock time.  The first (UTC) is preferred by Unix
machines, the second by Windows.  FreeBSD will cope with a CMOS clock
set to run using the local wall clock time in order to play nice on
multi-boot systems, but you have to tell the system it's operating in
that mode.

To change the setting, run /usr/sbin/tzsetup and when asked about the CMOS
clock on the first screen, choose 'Yes' if your machine runs FreeBSD always
or 'No' if you occasionally boot into  Windows.  Then choose your local
timezone from the menus. If, after doing that, there is a zero length file
/etc/wall_cmos_clock then you have set your system to use a CMOS clock set
to wall clock time.  See adjkerntz(1) for the full story.

After running tzsetup, either restart ntpd to force your machine to step
the clock a long way to sync with the server, or set the date/time manually
as Greg described upthread.

Cheers,

Matthew

-- 
Dr Matthew J Seaman MA, D.Phil.   7 Priory Courtyard
  Flat 3
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
  Kent, CT11 9PW



signature.asc
Description: OpenPGP digital signature


Re: Time zone isn't displaying right one with 'tzsetup'

2006-08-23 Thread Pete Slagle
Greg 'groggy' Lehey wrote:

 On Tuesday, 22 August 2006 at 23:45:19 -0400, Robert Gabaree wrote:
 Hi,

 I tried to update my new server to the new time zone by running
 'tzsetup' and selecting Eastern.  However, instead of showing 11:45,
 it shows 6:45 - 5 hours later.  I even tried to do a 'cp /usr/share/
 zoneinfo/EST5EDT /etc/localtime but it didn't help.  What can I do
 to fix it?
 
 That depends on whether you're running ntpd or not.  If you are, your
 best bet is to stop ntpd and run ntpdate, specifying the same server,
 then restart ntpd.
 
 If you're not running ntpd, just set the date:
 
   date 08232355
 
 See the man page for the format.
 
 Greg

Also, instead of copying EST5EDT to /etc/localtime you can use a
symlink. That way when EST5EDT gets updated you will automatically use
the new version.

So,

  su
  cd /etc
  ln -s /usr/share/zoneinfo/EST5EDT localtime
  exit

Obviously, substitute the appropriate zoneinfo file if you are not on US
Eastern time.






___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Time zone isn't displaying right one with 'tzsetup'

2006-08-22 Thread Robert Gabaree

Hi,

I tried to update my new server to the new time zone by running  
'tzsetup' and selecting Eastern.  However, instead of showing 11:45,  
it shows 6:45 - 5 hours later.  I even tried to do a 'cp /usr/share/ 
zoneinfo/EST5EDT /etc/localtime but it didn't help.  What can I do  
to fix it?


Thanks,
Rob
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time zone isn't displaying right one with 'tzsetup'

2006-08-22 Thread Greg 'groggy' Lehey
On Tuesday, 22 August 2006 at 23:45:19 -0400, Robert Gabaree wrote:
 Hi,

 I tried to update my new server to the new time zone by running
 'tzsetup' and selecting Eastern.  However, instead of showing 11:45,
 it shows 6:45 - 5 hours later.  I even tried to do a 'cp /usr/share/
 zoneinfo/EST5EDT /etc/localtime but it didn't help.  What can I do
 to fix it?

That depends on whether you're running ntpd or not.  If you are, your
best bet is to stop ntpd and run ntpdate, specifying the same server,
then restart ntpd.

If you're not running ntpd, just set the date:

  date 08232355

See the man page for the format.

Greg
--
When replying to this message, please copy the original recipients.
If you don't, I may ignore the reply or reply to the original recipients.
For more information, see http://www.lemis.com/questions.html
See complete headers for address and phone numbers.


pgpe5PUzHQALB.pgp
Description: PGP signature


Re: Time zone isn't displaying right one with 'tzsetup'

2006-08-22 Thread jdow

From: Robert Gabaree [EMAIL PROTECTED]


Hi,

I tried to update my new server to the new time zone by running  
'tzsetup' and selecting Eastern.  However, instead of showing 11:45,  
it shows 6:45 - 5 hours later.  I even tried to do a 'cp /usr/share/ 
zoneinfo/EST5EDT /etc/localtime but it didn't help.  What can I do  
to fix it?


What time does your BIOS say? And did you tell Linux which time zone
the BIOS thinks it is in?

There is a UTC=true or UTC=false line in /etc/sysconfig/clock you
might investigate.

{^_^}
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


RE: How to Change the Time Zone Rules?

2006-07-30 Thread Murray Taylor
Here is the process we used for the Commonwealth Games (when the 
end of Daylight saving was stretched for this year..) This does all
timezone files even though this procedure below only talks about
Australia.

NB The file name is now dated... user the appropriate current tzdata
file !!!



procedure 8--
- save the file (tzdata2005r.tar.gz) into /usr/src/share/zoneinfo then
as root

# cd /usr/src/share/zoneinfo
# tar zxf tzdata2005r.tar.gz
# make
# make install
# cp /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
# chmod 600 /etc/localtime

Elapsed time - about as fast as you type the commands. 

This will update _all_ Australian timezone files (and apply various
other 
international updates also) on that host. repeat as necessary on other
hosts.

!*!*!*!
a sanity check 

# zdump -v /usr/share/zoneinfo/Australia/Melbourne | grep 2006

before and after the procedure.
Before- the results will show Daylight saving ending in March 
After - the results will show it ending correctly on the 1st Sunday in
April.

Similar tests can be run for Adelaide, Sydney etc. 
Also a test with Brisbane returns nothing as they don't 
use DST rules. Neither does Lindeman but Lord_Howe does  sigh 

end procedure 8--


NB you may need to update this file also _before_ doing the above ... 
(Im not sure, but our net weenie said it was necessary)

/usr/share/misc/iso3166

Murray Taylor

Special Projects Engineer
Bytecraft Systems
--
Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction.
--Albert Einstein 


 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Carlos A. Carnero Delgado
 Sent: Saturday, 29 July 2006 1:20 AM
 To: Martin McCormick
 Cc: freebsd-questions@freebsd.org
 Subject: Re: How to Change the Time Zone Rules?
 
 Hello,
 
 On 7/28/06, Martin McCormick [EMAIL PROTECTED] wrote:
   My question is, How do I get there from here?
 
 See zic(8). It's very easy.
 
 Best regards,
 Carlos.
 --
 nick grah windows just crashed again, unstable crap.
 yukito Windows isn't unstable, it's just spontaneous.
 ___
 freebsd-questions@freebsd.org mailing list 
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to 
 [EMAIL PROTECTED]
 
 ***This Email has been scanned for Viruses by MailMarshal.***
 
---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

***This Email has been scanned for Viruses by MailMarshal.***
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


How to Change the Time Zone Rules?

2006-07-28 Thread Martin McCormick
The rules for determining the yearly start and end of
daylight saving time in the United States have changed beginning
in March of 2007.  All the FreeBSD systems I am in charge of need
new rules and I read an article that mentions FreeBSD and Linux
and the /usr/share/zoneinfo data base which I found.  In that
directory are subdirectories for the continents and many binaries
describing the rules for major cities or islands.  /etc/localtime
is a copy of whichever locality file in /usr/share/zoneinfo
correctly mirrors one's local time.

The problem, as I see it, is that we need a new America
file.  I ran across an article that referenced

ftp://elsie.nci.nih.gov/pub/tzdata2006h.tar.gz

Which turns out to be the source file for making all the
location files.

My question is, How do I get there from here?  That file
is obviously #included or otherwise used in something you make to
generate the objects.  Has this already been done somewhere for
FreeBSD and will it work on systems ranging from FreeBSD4.7 up to
5.4?

I use FreeBSD on our domain name and dhcp servers and
want to get them ready well before this mini Y2K-like situation
hits.

Many thanks.

For those who may be wondering, DST ends as it has for
many years, on the last Sunday in October so the new rules don't
take effect until March 11 of 2007.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Change the Time Zone Rules?

2006-07-28 Thread Carlos A. Carnero Delgado

Hello,

On 7/28/06, Martin McCormick [EMAIL PROTECTED] wrote:

 My question is, How do I get there from here?


See zic(8). It's very easy.

Best regards,
Carlos.
--
nick grah windows just crashed again, unstable crap.
yukito Windows isn't unstable, it's just spontaneous.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: How to Change the Time Zone Rules?

2006-07-28 Thread Martin McCormick
Carlos A. Carnero Delgado writes:
See zic(8). It's very easy.

DAve writes:
This was sent to me earlier on this list when I had to adjust for 
Indiana changing to DST. Worked like a champ.

https://engineering.purdue.edu/ECN/Resources/KnowledgeBase/Docs/20060128100824

Thank you both.  This is what I needed.

Martin McCormick WB5AGZ  Stillwater, OK 
Systems Engineer
OSU Information Technology Department Network Operations Group
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time Zone

2006-01-17 Thread Jerry McAllister
 
 What is the prefered time zone for a web server
 
 Is it better to keep it GMT or local timezone ?
 
 I am in eastern time zone so I need to deal with standard and daily 
 saving time...

We keep ours on local time.
I think that is the way most do it.

jerry

 
 Thanks
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time Zone

2006-01-17 Thread Crispy Beef

Ian Lord wrote:

What is the prefered time zone for a web server

Is it better to keep it GMT or local timezone ?

I am in eastern time zone so I need to deal with standard and daily 
saving time...


We are UK based but our server (and most of our customers) are US based, so we 
keep the US time (EST) as it makes more sense when emails are sent out and 
orders made etc.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time Zone

2006-01-17 Thread Danny Howard
On Tue, Jan 17, 2006 at 01:32:01AM -0400, Carlos A. Carnero Delgado wrote:
 On 1/16/06, Ian Lord [EMAIL PROTECTED] wrote:

  What is the prefered time zone for a web server
 
  Is it better to keep it GMT or local timezone ?
 
 Both ;) Set the machine's clock to GMT (actually, UTC.) Then set the
 correct timezone for your location.

Actually, the SYSTEM CLOCK is UTC, right?  Unless you're supporting a
Weeendows dual-boot environment.  Timezone is then a locale setting.

I like to leave the timezone alone, and let uers or applications set the
time zone to whatever they please.

What time zone should you use?  Whatever time zone you like.  If you set
the zone to EST5EDT then then the system locale will adapt DST for you
automatically.

-danny

-- 
http://dannyman.toldme.com/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Time Zone

2006-01-16 Thread Ian Lord

What is the prefered time zone for a web server

Is it better to keep it GMT or local timezone ?

I am in eastern time zone so I need to deal with standard and daily 
saving time...


Thanks

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Time Zone

2006-01-16 Thread Carlos A. Carnero Delgado
Hello,

On 1/16/06, Ian Lord [EMAIL PROTECTED] wrote:
 What is the prefered time zone for a web server

 Is it better to keep it GMT or local timezone ?

Both ;) Set the machine's clock to GMT (actually, UTC.) Then set the
correct timezone for your location.

Best regards,
Carlos.
--
nick grah windows just crashed again, unstable crap.
yukito Windows isn't unstable, it's just spontaneous.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FYI: Time zone information update for Cuba

2004-10-26 Thread Carlos A. Carnero Delgado
Hello,
Kris Kennaway wrote:
the attached diff updates /usr/src/share/zoneinfo/northamerica for this 
year's unique time handling in Cuba.
Wasn't an update already committed to -current?
Well, AFAICT, there was a recent commit for Brazil and Argentina data. 
In any case I think that it was impossible for the tzdata maintainer to 
update since changes in Cuba were just announced.

I'm not sure, but that information should be in the relevant parts of
the source tree that you're already looking at.
Yup, it was/is right there!
Kris
Thanks a lot,
--
Carlos A. Carnero Delgado | [EMAIL PROTECTED] | http://www.carnero.ca
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FYI: Time zone information update for Cuba

2004-10-26 Thread Kris Kennaway
On Tue, Oct 26, 2004 at 02:35:12AM -0400, Carlos A. Carnero Delgado wrote:
 Hello,
 
 Kris Kennaway wrote:
 the attached diff updates /usr/src/share/zoneinfo/northamerica for this 
 year's unique time handling in Cuba.
 
 Wasn't an update already committed to -current?
 
 Well, AFAICT, there was a recent commit for Brazil and Argentina data. 
 In any case I think that it was impossible for the tzdata maintainer to 
 update since changes in Cuba were just announced.

OK, cool.  You also might like to talk to [EMAIL PROTECTED] who
maintains this code in FreeBSD.  He might want you to wait for the
upstream vendor to incorporate the change and release a new version
though.

Kris


pgp4DlNUqV7OV.pgp
Description: PGP signature


FYI: Time zone information update for Cuba

2004-10-25 Thread Carlos A. Carnero Delgado
Hi,
the attached diff updates /usr/src/share/zoneinfo/northamerica for this 
year's unique time handling in Cuba.

BTW, who is the maintainer of the package that FreeBSD draws this 
information from? I'd like to send this so that other OSes can have the 
update.

Best regards,
Carlos.
--- /usr/src/share/zoneinfo/northamericaTue Oct 14 17:03:22 2003
+++ northamericaMon Oct 25 10:46:06 2004
@@ -1733,8 +1733,10 @@
 Rule   Cuba1996only-   Oct  6  0:00s   0   S
 Rule   Cuba1997only-   Oct 12  0:00s   0   S
 Rule   Cuba19981999-   Mar lastSun 0:00s   1:00D
-Rule   Cuba1998max -   Oct lastSun 0:00s   0   S
-Rule   Cuba2000max -   Apr Sun=1  0:00s   1:00D
+Rule   Cuba19982003-   Oct lastSun 0:00s   0   S
+Rule   Cuba20002004-   Apr Sun=1  0:00s   1:00D
+Rule   Cuba2004max -   Mar lastSun 0:00s   1:00D
+Rule   Cuba2005max -   Oct lastSun 0:00s   0   S
 
 # Zone NAMEGMTOFF  RULES   FORMAT  [UNTIL]
 Zone   America/Havana  -5:29:28 -  LMT 1890
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FYI: Time zone information update for Cuba

2004-10-25 Thread Kris Kennaway
On Mon, Oct 25, 2004 at 10:59:19AM -0400, Carlos A. Carnero Delgado wrote:
 Hi,
 
 the attached diff updates /usr/src/share/zoneinfo/northamerica for this 
 year's unique time handling in Cuba.

Wasn't an update already committed to -current?

 BTW, who is the maintainer of the package that FreeBSD draws this 
 information from? I'd like to send this so that other OSes can have the 
 update.

I'm not sure, but that information should be in the relevant parts of
the source tree that you're already looking at.

Kris


pgpxnGXxURwlX.pgp
Description: PGP signature