You never change the system clock timezone on Unix. It is always UTC (a.k.a. GMT).
The way the clock is *displayed* depends on the environment variable TZ and so can vary on a per process basis. To view the correct timezone in your shell, just run:
Code:
TZ=US/Eastern
export TZ
date
If you want the default timezone to be set, you'll need to reboot.
Sorry I think someone already pointed out this but I couldn't find it.
Please tell me what is the difference between SunOS Version and Solaris Version.
What is the purpose of maintaining these two things ?
Thanks (2 Replies)
I have compiled binary file using "cc" on SunOS 5.8 and the same binary file i have copied to SunOS 5.9 and it is giving me core dump error.I want to know whether migration of compiled code from lower version to higer version created this problem. how can i solve this problem.I am pasting the core... (1 Reply)
Hi,
In solaris how to change the timezone to display to HKT
I tried by putting TZ=Hongkong or TZ=Asia/Hong_kong
but it is taking me to the display of CST.
how to change it to HKT
thanks
Bala (1 Reply)
Does anyone know if there is a patch for SunOS 5.6 timezone update for new daylight savings times. I have looked and have updated my 5.8 machine. Can not find one for 5.6. I still use one box for a certian piece of hardware that can not use the newer versions. (6 Replies)
QUERY SCENARIO
Here is the actual scenario
LOOP
echo "$COLNAME $TYPENAME($LENGTH) $NULLS ">>$DDL_FILE
END-LOOP
COLNAME, TYPENAME, LENGTH, NULLS are the variables and within echo statment the output of which has to go into file specified by DDL_FILE.
... (1 Reply)
Hi
On several AIX 5.3 LPARs the timezone is currrently set to:
TZ=NZST-12NZDT,M9.5.0/02:00,M4.1.0/03:00
Daylight savings in NZ starts on Sun 28th Sep 2008, which is the fourth Sunday. Do I need to change my TZ variable to NZST-12NZDT,M9.4.0/02:00,M4.1.0/03:00 or will AIX interpret the fifth... (2 Replies)
A bit of searching on Google did not seem to yield any really helpful results on how to set vim to use k&r indentation style. I know Emacs has such a feature, but does vim? If so, how do I turn it on? I am just starting to learn vi, and when I am coding in C it looks really ugly without some sort... (2 Replies)
Hi All,
I am using a book to learn C++. Unfortunately the book, sometimes, uses the maddening phrase, #include <conio.h>, which is a M$ related file and not a part of STL, in some of its examples.
My question is: How would you modify the following code so it would compile and run on Linux?... (3 Replies)
What is the easiest way to find the date 6 month prior to the current date.
Example:
Today is 2011/01/29
I need to find the 1st day of the month, 6 month ago, which is 2010/08/01. I have to count 1/1/2011 as a previous month, since the current day is past 1/1/2011. Is there any easy... (4 Replies)
Hello All
I’ve made the decision to switch my storage server from FreeNAS to Solaris. I opted to use FreeNAS as it has ZFS and until BTRFS is stable, it’s the best option (IMHO) for backup and network storage.
The switch was facilitated by the USB stick that FreeNAS was on got lost during a... (1 Reply)
Discussion started by: BlueDalek
1 Replies
LEARN ABOUT CENTOS
pmwhichzone
PMWHICHZONE(3) Library Functions Manual PMWHICHZONE(3)NAME
pmWhichZone - return current reporting timezone
C SYNOPSIS
#include <pcp/pmapi.h>
int pmWhichZone(char **tz);
cc ... -lpcp
DESCRIPTION
The current reporting timezone effects the timezone used by pmCtime(3) and pmLocaltime(3).
pmWhichZone returns the handle of the current timezone, as previously established by a call to pmNewZone(3) or pmNewContextZone(3). If the
call is successful (i.e. there exists a current reporting timezone) then a non-negative integer is returned and tz is set to point to a
static buffer containing the timezone string itself.
SEE ALSO PMAPI(3), pmCtime(3), pmLocaltime(3), pmNewContextZone(3), pmNewZone(3) and pmUseZone(3).
DIAGNOSTICS
A return value less than zero indicates there is no current reporting timezone.
Performance Co-Pilot PCP PMWHICHZONE(3)