09-01-2007
Time issue with two different zones
Our city zone is Pacific standard time(PST). and our unix server time zone is GMT.
I am calling informatica job in unix script. Below is the steps in script.
1. Before starting the informatica job i get the datetime in startdate variable.
2. Calling the informatica configuration file which has the timezone as GMT.
3. Now the informatica job is called and upon the completion of Informatica job, I get the datetime in enddate variable.
This works fine in development environment. ie startdate and enddate variable values are in GMT timezone.
In Production the above unix script is called in Control M scheduler application which has the PST. The starttime variable is set to PST and enddate variable is set to GMT. so we were not able to get exact time difference. Is this due to the Control M scheduler timezone.
Control M and our login account are same. I checked in the production unix box time zone using TZ variable shows GMT timezone.
Pl help me to solve this issue.
6 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all, this is my first post so I hope someone can help me. I am currently putting code into a script that is run through the cron on a unix box where the date/time is set to EDT or Eastern Daylight Time but I am in Central Standard time. The program I am adding code to runs every hour and I put... (1 Reply)
Discussion started by: ldgriess
1 Replies
2. UNIX for Advanced & Expert Users
I've been tasked to implement ntp on my SCO Unix servers. I have over 600 servers spread across the US in different time zones. Each remote server has network connectivity to a main server here, through their local ISP. (That's how we currently deliver mail to them).
My question is, how can... (5 Replies)
Discussion started by: Howeird
5 Replies
3. Solaris
I 'm running solaris10 u6 with 141414-02. My system is T5220 running 2 Ldoms and 7 zones on primary domain. I 'm tryin to create booth environment on my alternate root disk after breaking the SVM mirroring but it does not go well and stuck at some point , and i have to reboot the system to get rid... (1 Reply)
Discussion started by: fugitive
1 Replies
4. Solaris
Hi,
Is it possible to enable the time service in local zones?
E.g.
erahmanz1% svcs -a | grep -i time
STATE STIME FMRI
disabled Sep_10 svc:/network/daytime:dgram
disabled Sep_10 svc:/network/daytime:stream
disabled Sep_10 svc:/network/time:dgram... (2 Replies)
Discussion started by: ERahman
2 Replies
5. Solaris
Hi frnds...
I just had interview with a client ,
question :: how do you implement solaris zones in real time.
please can anyone give me stepbystep process of zones....
i know its there in sol10 pdf
but i want short explantion which i can use to answer an interviewer...
THANKS IN... (0 Replies)
Discussion started by: yrajendergoud
0 Replies
6. Solaris
can some one help me out as it is showing 2 different time zones in global zone and nonglobal zone .In global zone it is showing in GMT while in nonglobal zone i it showing as PDT.
System in running with solaris 10 (3 Replies)
Discussion started by: ravijanjanam12
3 Replies
LEARN ABOUT LINUX
date::parse
Date::Parse(3pm) User Contributed Perl Documentation Date::Parse(3pm)
NAME
Date::Parse - Parse date strings into time values
SYNOPSIS
use Date::Parse;
$time = str2time($date);
($ss,$mm,$hh,$day,$month,$year,$zone) = strptime($date);
DESCRIPTION
"Date::Parse" provides two routines for parsing date strings into time values.
str2time(DATE [, ZONE])
"str2time" parses "DATE" and returns a unix time value, or undef upon failure. "ZONE", if given, specifies the timezone to assume when
parsing if the date string does not specify a timezone.
strptime(DATE [, ZONE])
"strptime" takes the same arguments as str2time but returns an array of values "($ss,$mm,$hh,$day,$month,$year,$zone)". Elements are
only defined if they could be extracted from the date string. The $zone element is the timezone offset in seconds from GMT. An empty
array is returned upon failure.
MULTI-LANGUAGE SUPPORT
Date::Parse is capable of parsing dates in several languages, these include English, French, German and Italian.
$lang = Date::Language->new('German');
$lang->str2time("25 Jun 1996 21:09:55 +0100");
EXAMPLE DATES
Below is a sample list of dates that are known to be parsable with Date::Parse
1995:01:24T09:08:17.1823213 ISO-8601
1995-01-24T09:08:17.1823213
Wed, 16 Jun 94 07:29:35 CST Comma and day name are optional
Thu, 13 Oct 94 10:13:13 -0700
Wed, 9 Nov 1994 09:50:32 -0500 (EST) Text in ()'s will be ignored.
21 dec 17:05 Will be parsed in the current time zone
21-dec 17:05
21/dec 17:05
21/dec/93 17:05
1999 10:02:18 "GMT"
16 Nov 94 22:28:20 PST
LIMITATION
Date::Parse uses Time::Local internally, so is limited to only parsing dates which result in valid values for Time::Local::timelocal. This
generally means dates between 1901-12-17 00:00:00 GMT and 2038-01-16 23:59:59 GMT
BUGS
When both the month and the date are specified in the date as numbers they are always parsed assuming that the month number comes before
the date. This is the usual format used in American dates.
The reason why it is like this and not dynamic is that it must be deterministic. Several people have suggested using the current locale,
but this will not work as the date being parsed may not be in the format of the current locale.
My plans to address this, which will be in a future release, is to allow the programmer to state what order they want these values parsed
in.
AUTHOR
Graham Barr <gbarr@pobox.com>
COPYRIGHT
Copyright (c) 1995-2009 Graham Barr. This program is free software; you can redistribute it and/or modify it under the same terms as Perl
itself.
perl v5.10.1 2010-07-28 Date::Parse(3pm)