Sponsored Content
Operating Systems Solaris Solaris 9 Zone : Date command in crontab shows delayed(One Hour) output Post 302771111 by jlliagre on Tuesday 19th of February 2013 04:43:59 PM
Old 02-19-2013
The clock is correct, the timezone setting is not for some reason. Please provide more clues/evidences.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

getting the date in crontab command

Hi All, There is a requirement to create a file everyday using the cronjob with the date as its name. any suggestions for the crontab command that'll serve this purpose? e.g. 02 30 * * * touch abcd.`date +%d.%m.%y` needless to say.. this doesn't work.. looking fwd to lots of... (7 Replies)
Discussion started by: pranavagarwal
7 Replies

2. Shell Programming and Scripting

Getting date output based on time zone

Hi, We have a server in US and hence while the command "date" is given it gives the output in EDT. If I want the date output in MET, how can I get it. Please let me know how I could do it in the script which is ksh. Thanks. (1 Reply)
Discussion started by: jmathew99
1 Replies

3. Solaris

prtdiag output for Solaris on Fujitsu hardware shows vendor as Sun Microsystems

Hello, I was under the impression that the Header of the prtdiag output shows the hardware vendor information in the section between System Configuration and sun4u/sun4us. But on some Solaris machines which are running on Fujitsu hardware, the vendor is shown as Sun Microsystems in this... (8 Replies)
Discussion started by: chattygk
8 Replies

4. Solaris

Solaris Crontab & TOP output

Hello Guru's I'm trying to take the output of solaris top command and output to a txt file every few minutes. The issue that I'm experiencing is that I can run the following: #!/bin/bash # logfile="/usr/mvf/morris/top.log" # echo... (2 Replies)
Discussion started by: littlemorris
2 Replies

5. Solaris

Df -k command shows duplicate information in Solaris machine, How to get the exact disk space

While getting the total disk space in solaris machine using df -k command, i am getting the same disk info for every user available in that system. Is there any way to remove it. Filesystem 1024-blocks Used Available Capacity Mounted on rpool/ROOT/solaris 573898752... (3 Replies)
Discussion started by: prasankn
3 Replies

6. UNIX for Dummies Questions & Answers

Crontab in Solaris zone

Hi, I created some cron entries in one of the 4 zones in Solaris 10. Now I want to edit it and unable to find the crontab file crontab -l gives : unable to open crontab file /usr/spool/cron/crontabs doesn't have the crontab file Hence, I did ifconfig -a and tried to login with the 3... (2 Replies)
Discussion started by: Rossdba
2 Replies

7. Solaris

Global Zone getting crontab info from zone

Hi, First post. I have a script that I am having a little trouble with and I hope someone can help. I will post the code for your input, but I want to read the lines of a file and use this as input to a command in a while loop... #!/bin/sh # # ### Variables MSG=/tmp/tmptest.txt... (7 Replies)
Discussion started by: dakelly
7 Replies

8. Solaris

Solaris 11 Global zone patching having Solaris 10 branded zone

I am planning to do solaris 11 global zone patching having solaris 10 branded zone. I have a doubts on step 8 specially Can someone clear my step 8 doubts or if anything wrong between step 1 to step 9 please correct that also as I have pretty good idea about Step 10 mean patching in solaris 10... (2 Replies)
Discussion started by: amity
2 Replies
CTIME(3)						     Library Functions Manual							  CTIME(3)

NAME
ctime, localtime, gmtime, asctime, timezone, tzset - convert date and time to ASCII SYNOPSIS
void tzset() char *ctime(clock) time_t *clock; #include <time.h> char *asctime(tm) struct tm *tm; struct tm *localtime(clock) time_t *clock; struct tm *gmtime(clock) time_t *clock; char *timezone(zone, dst) DESCRIPTION
Tzset uses the value of the environment variable TZ to set up the time conversion information used by localtime. If TZ does not appear in the environment, the TZDEFAULT file (as defined in tzfile.h) is used by localtime. If this file fails for any reason, the GMT offset as provided by the kernel is used. In this case, DST is ignored, resulting in the time being incorrect by some amount if DST is currently in effect. If this fails for any reason, GMT is used. If TZ appears in the environment but its value is a null string, Greenwich Mean Time is used; if TZ appears and begins with a slash, it is used as the absolute pathname of the tzfile(5)-format file from which to read the time conversion information; if TZ appears and begins with a character other than a slash, it's used as a pathname relative to the system time conversion information directory, defined as TZDIR in the include file tzfile.h. If this file fails for any reason, GMT is used. Programs that always wish to use local wall clock time should explicitly remove the environmental variable TZ with unsetenv(3). Ctime converts a long integer, pointed to by clock, such as returned by time(2) into ASCII and returns a pointer to a 26-character string in the following form. All the fields have constant width. Sun Sep 16 01:03:52 1973 Localtime and gmtime return pointers to structures containing the broken-down time. Localtime corrects for the time zone and possible day- light savings time; gmtime converts directly to GMT, which is the time UNIX uses. Asctime converts a broken-down time to ASCII and returns a pointer to a 26-character string. The structure declaration from the include file is: struct tm { int tm_sec; /* 0-59 seconds */ int tm_min; /* 0-59 minutes */ int tm_hour; /* 0-23 hour */ int tm_mday; /* 1-31 day of month */ int tm_mon; /* 0-11 month */ int tm_year; /* 0- year - 1900 */ int tm_wday; /* 0-6 day of week (Sunday = 0) */ int tm_yday; /* 0-365 day of year */ int tm_isdst; /* flag: daylight savings time in effect */ char **tm_zone; /* abbreviation of timezone name */ long tm_gmtoff; /* offset from GMT in seconds */ }; Tm_isdst is non-zero if a time zone adjustment such as Daylight Savings time is in effect. Tm_gmtoff is the offset (in seconds) of the time represented from GMT, with positive values indicating East of Greenwich. Timezone remains for compatibility reasons only; it's impossible to reliably map timezone's arguments (zone, a "minutes west of GMT" value and dst, a "daylight saving time in effect" flag) to a time zone abbreviation. If the environmental string TZNAME exists, timezone returns its value, unless it consists of two comma separated strings, in which case the second string is returned if dst is non-zero, else the first string. If TZNAME doesn't exist, zone is checked for equality with a built-in table of values, in which case timezone returns the time zone or daylight time zone abbreviation associated with that value. If the requested zone does not appear in the table, the difference from GMT is returned; e.g. in Afghanistan, timezone(-(60*4+30), 0) is appropri- ate because it is 4:30 ahead of GMT, and the string GMT+4:30 is returned. Programs that in the past used the timezone function should return the zone name as set by localtime to assure correctness. FILES
/usr/share/zoneinfotime zone information directory /etc/localtime local time zone file SEE ALSO
gettimeofday(2), getenv(3), time(3), tzfile(5), environ(7) NOTE
The return values point to static data whose content is overwritten by each call. The tm_zone field of a returned struct tm points to a static array of characters, which will also be overwritten at the next call (and by calls to tzset). 4th Berkeley Distribution November 27, 1996 CTIME(3)
All times are GMT -4. The time now is 12:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy