Sponsored Content
Full Discussion: DST script for 5.0.0
Operating Systems SCO DST script for 5.0.0 Post 302107293 by Perderabo on Thursday 15th of February 2007 11:29:39 PM
Old 02-16-2007
There may be an option for you. On the OpenServer environ man page it says:
Quote:
TZ
Defines time zone information. This information is used by date(C) to display the appropriate time. The variable may have any value of the form:

std offset [ dst [ offset ],[ start [ /time ], end [ /time ]]]

(You may also have:

std offset [ dst [ offset ];[ start [ /time ], end [ /time ]]]

which is the XENIX format. Note that this format is not POSIX compatible.)

std, the standard local time zone abbreviation (1-9 characters), and offset, the difference between the local time and GMT, are the only mandatory fields.

offset should be specified as:

[ + | - ] hh [ :mm [ :ss ]]

where hh is hours (0-24), mm is minutes (0-59), and ss is seconds (0-59). Only the hours field is mandatory. If offset is preceded by a minus (-), it is east of the Prime Meridian, otherwise it is assumed to be west (this can be specified with an optional plus (+)).

dst is a 1-9 character abbreviation for the local summertime timezone. If dst is not specified, the system will not be aware of summertime; it will always be on standard time.

The offset after dst is the difference between local standard time and local summertime. If you do not specify an offset, it is assumed to be one hour. (This is usually what you want.)

Everything following the second offset is the rule for when to change from standard to summertime. start/time is when the change to summertime occurs; end/time is when the time changes back. (Note that, for systems in the Southern Hemisphere, start/time does not have to come earlier in the year than end/time.)

start and end describe the day, while time specifies the time. time is specified in the same way as offset (see above), but the leading ``+'' or ``-'' is not valid. If time is not specified, it is assumed to be 02:00:00 (2 A.M.).

start and end can be specified in any of the following ways:


Jn
The Julian day (1-365). Leap years are not counted; February 28 is day 59 and March 1 is day 60, always.

n
The zero-based Julian day (0-365); you can refer to February 29 in a leap year.

Wn.d
The dth day (0-6, where 0 is Sunday) of week n (1-4).

Mm.n.d
The dth day (0-6, where 0 is Sunday) of week n (1-5) of month m (1-12). If you specify the week (n) as 5, this means the last d day in m month, as in M8.5.1 which would be the last Monday in August.

If you specify the comma starting off the summertime rule, it is advisable to specify the rest of the rule.

A sample TZ for Eastern Standard Time, EST, might look like this:

EST5:00:00EDT4:00:00,M4.1.0/2:00:00,M10.5.0/2:00:00.

We start off with ``EST5:00'': this names our time zone and defines it as five hours west of Greenwich Mean Time. Summertime in this locale is called EDT (Eastern Daylight Time), and is four hours ahead of GMT. Summertime starts on a Sunday in the first week in April at 2 A.M., and standard time resumes on the last Sunday in October at 2 A.M.

Refer to the tz(M) and timezone(F) manual pages for more information on TZ.
For the revised rule:
EST5:00:00EDT4:00:00,M3.2.0/2:00:00,M11.1.0/2:00:00
should work for the Eastern Zone. But I can't test it.
 

10 More Discussions You Might Find Interesting

1. Solaris

DST on Solaris 2.6/7

I have several servers that are outside the country and are running Solaris 6 mainly with a few Solaris 7 boxes here and there. Because of that, we need to schedule time to change the time on March 11th and again in April, October and November. At least until the customer decides it's time to... (3 Replies)
Discussion started by: BOFH
3 Replies

2. SCO

Dst - V 3.6.3

Hello, Anyone know where I can find the DST updates for SCO Xdesktop 3.6.3? Thanks (0 Replies)
Discussion started by: ddzc
0 Replies

3. UNIX for Dummies Questions & Answers

How to verify DST Update

Hello, Does anyone know how can I verify if the DST update on a SCO Unixware system has been installed successfully? UNIXWARE 7.1.4 MP3 Looking forward to some help, please.... Thanks (8 Replies)
Discussion started by: Yorgy
8 Replies

4. AIX

AIX and DST

Just a quick last minute thing here. AIX 5.1. I ran the perl script referenced in the tutorials and found the AIX box is triggering DST on the 14th instead of the 11th. The 5.2 boxes come back with the right answers. The DST patches have been applied (or I'd have Apr 1st instead of the 14th). ... (0 Replies)
Discussion started by: BOFH
0 Replies

5. Solaris

DST Patch

How to update DST patch. Whatat are the necessary steps that have to be taken on the servers to update this patch?. (1 Reply)
Discussion started by: sandeepkv
1 Replies

6. What is on Your Mind?

The Switch to DST 2007 --- How Did It Go?

We have been discussing the 2007 changes to DST (Daylight Saving Time) for some time now. We hope that everything went well. But did it? Let us know by voting or by posting your experiences here. The poll will automatically close in 45 days. (6 Replies)
Discussion started by: Perderabo
6 Replies

7. Shell Programming and Scripting

DST Change For Australia

Hello , We are investigating an issue from a customer from Western Australia related to DST change on 25 th March. The customer in Australia has the below settings for Time Zone. The System is Solaris 9. TZ=Australia/NSW CMASK=022 We are trying to reproduce the problem in our local... (1 Reply)
Discussion started by: Mohammed
1 Replies

8. Linux

my server is 1 hour behind after DST

Hello, I have linux server which is one hour behind after the DST change last week. I post some information below on the settings. any helpwould be helpful since I am newbie.. $ clock Tue 04 Nov 2008 03:12:26 PM EST -0.785549 seconds $more clock Tue 04 Nov 2008 03:12:26 PM EST... (2 Replies)
Discussion started by: jbdavis02@yahoo
2 Replies

9. Shell Programming and Scripting

Determine if given date is in DST

Is there a way to figure out if given date is in DST or in EST? So imagine a shell script is_date_dst.sh sh is_date_dst.sh 2009-03-02 would return 0 and sh is_date_dst.sh 2009-03-22 would return 1 This script should not assume the timezone of the machine it runs on, but only the date passed... (7 Replies)
Discussion started by: asriva
7 Replies

10. UNIX for Advanced & Expert Users

Handle Autosys with DST Changes

Hi, I have one confusion regarding DST chnages which are going to happen after October. :confused: :confused: I have few jobs on Autosys which run as per Japan Time. they shoudl not be affected by switiching off of DST time. Our autosys instance server is based on UK which is running on... (0 Replies)
Discussion started by: girdharsourabh
0 Replies
rtc(1M)                                                   System Administration Commands                                                   rtc(1M)

NAME
rtc - provide all real-time clock and GMT-lag management SYNOPSIS
/usr/sbin/rtc [-c] [-z zone-name] DESCRIPTION
On x86 systems, the rtc command reconciles the difference in the way that time is established between UNIX and MS-DOS systems. UNIX systems utilize Greenwich Mean Time (GMT), while MS-DOS systems utilize local time. Without arguments, rtc displays the currently configured time zone string. The currently configured time zone string is based on what was last recorded by rtc-z zone-name. The rtc command is not normally run from a shell prompt; it is generally invoked by the system. Commands such as date(1) and rdate(1M), which are used to set the time on a system, invoke /usr/sbin/rtc -c to ensure that daylight savings time (DST) is corrected for properly. OPTIONS
-c This option checks for DST and makes corrections if necessary. It is normally run once a day by a cron job. If there is no RTC time zone or /etc/rtc_config file, this option will do nothing. -z zone-name This option, which is normally run by the system at software installation time, is used to specify the time zone in which the RTC is to be maintained. It updates the configuration file /etc/rtc_config with the name of the specified zone and the current GMT lag for that zone. If there is an existing rtc_config file, this command will update it. If not, this command will create it. FILES
/etc/rtc_config The data file used to record the time zone and GMT lag. This file is completely managed by /usr/sbin/rtc, and it is read by the kernel. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Architecture |x86 | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
date(1), rdate(1M), attributes(5) SunOS 5.10 3 Oct 2003 rtc(1M)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy