But on our Solaris machine, we have the 'Europe/London' folder and file, a GB file and a GB-Eire file. Setting TZ to any of these does not work. All give:
Strange...so it looks like it might work correctly when I get the 'Europe/London' file under zoneinfo folder on AIX (will need to test this)...but not sure why it does not work on Solaris.
Not sure why it doesnt work on Solaris...I can only talk about AIX as that is the machine I use. However you can try to get the latest timezone patch for your Solaris machine. Btw what is the os version for your Solaris box and compare the outputs of the following commands on AIX and Solaris and see if there is any difference which might hint at a timezone patch...
Obviously you cant run the last command on AIX as it doesnt have the Europe/London timezone info file but post the outputs of those commands here so all can look and suggest a solution...
ok here is a perl date question not asked befor.
i know i am feeling small for not knowing. BUT!!!!
$ENV{TZ}="US/Central";
($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime();
how can i do the addition to year so i can get the current year w/o going $ntime=$year+1900;... (3 Replies)
I have this command in my script and it's working fine with AIX:
ls init?*.ora 2>/dev/null | egrep -i -e ""
the same command is failing in Solaris 10.
does anyone have better idea how to make it work for both ?
Thanks (1 Reply)
Strange behaviour of the strftime() function from gawk (3.1.5):
$ awk 'BEGIN{print strftime("%T", 3600)}'
> 02:00:00
$ awk 'BEGIN{print strftime("%T", 0)}'
> 01:00:00
Obviously something with DST but I can not figure out why? To me 3600 epoch seconds remains 01:00, DST or not.
From... (2 Replies)
Hello All,
I am facing a warning "Argument "" isn't numeric in localtime at"
what i m using is below
my $timestamp = Timestamp(time);
go_log("###############$timestamp###############");
can some one please suggest the way to avoid this message :confused: (6 Replies)
Hi Experts,
I know how to handle normal date changes in perl. Most of my requirement are full filled with following:
$date1 = strftime "%Y%m%d",localtime;
$date2 = strftime "%Y%m%d",localtime(time -24 * 60 * 60);
$date3 = strftime "%Y%m%d",localtime(time +24 * 60 * 60);
$date4 = strftime... (4 Replies)
HI,
i wish to convert a millsec value to a readable string format.
the one option is to use strftime.
However this is a bit costly (1-5 micros).
is there a a faster way to do so with just string manipulation
(Note i have the date object which has the time details but wish o avoid strftime) (2 Replies)
Hi,
I'm new to perl scripting and am trying it out.
I have a file written in the following format:
myfile-MMDDYY where MM is the number of the Month; DD the Day and YY the last two of the year... (Apologies for dumbing this down; I'm trying to be clear).
There is a new file put onto my... (2 Replies)
Hi all,
a=$1 ##
b=`echo "86400 * $a"|bc`
`perl -e 'use POSIX qw(strftime);$now_string = strftime "%d/%m/%Y", localtime(time-$b); print $now_string,"\n";' > date_file`
but im always getting current date; can any one suggest me any the improvement
the above works fine if i use some thing... (2 Replies)
GETTIMEOFDAY(2) System Calls Manual GETTIMEOFDAY(2)NAME
gettimeofday, settimeofday - get/set date and time
SYNOPSIS
#include <sys/time.h>
gettimeofday(tp, tzp)
struct timeval *tp;
struct timezone *tzp;
settimeofday(tp, tzp)
struct timeval *tp;
struct timezone *tzp;
DESCRIPTION
The system's notion of the current Greenwich time and the current time zone is obtained with the gettimeofday call, and set with the set-
timeofday call. The time is expressed in seconds and microseconds since midnight (0 hour), January 1, 1970. The resolution of the system
clock is hardware dependent, and the time may be updated continuously or in ``ticks.'' If tzp is zero, the time zone information will not
be returned or set.
The structures pointed to by tp and tzp are defined in <sys/time.h> as:
struct timeval {
long tv_sec; /* seconds since Jan. 1, 1970 */
long tv_usec; /* and microseconds */
};
struct timezone {
int tz_minuteswest; /* of Greenwich */
int tz_dsttime; /* type of dst correction to apply */
};
The timezone structure indicates the local time zone (measured in minutes of time westward from Greenwich), and a flag that, if nonzero,
indicates that Daylight Saving time applies locally during the appropriate part of the year.
Only the super-user may set the time of day or time zone.
RETURN
A 0 return value indicates that the call succeeded. A -1 return value indicates an error occurred, and in this case an error code is
stored into the global variable errno.
ERRORS
The following error codes may be set in errno:
[EFAULT] An argument address referenced invalid memory.
[EPERM] A user other than the super-user attempted to set the time.
SEE ALSO date(1), adjtime(2), ctime(3), timed(8)4th Berkeley Distribution May 14, 1986 GETTIMEOFDAY(2)