1832609 Members
2317 Online
110043 Solutions
New Discussion

Re: Timzone id

 
Sonny_8
Occasional Advisor

Timzone id

My OS is HP-UX 11i

Change timezone id
But When I test with JAVA program to produce the date

from ORCALE suuport
java.text.SimpleDateFormat@e3d1e9c0java.util.SimpleTimeZone[id=Asia/Calcutta,off
set=19800000,dstSavings=3600000,useDaylight=false,startYear=0,startMode=0,startM
onth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0,endMont
h=0,endDay=0,endDayOfWeek=0,endTime=0,endTimeMode=0]
03/01/2003 19:39:29 India Standard Time$

SP

java.util.SimpleTimeZone[id=Custom,offset=28800000,dstSavings=3600000,useDayligh
t=false,startYear=0,startMode=
0,startMonth=0,startDay=0,startDayOfWeek=0,startTime=0,startTimeMode=0,endMode=0
,endMonth=0,endDay=0,endDayOfW
eek=0,endTime=0,endTimeMode=0]
03/01/2003 14:38:12 GMT+08:00
Fri Jan 03 14:38:12 GMT+08:00 2003


My Question is How to change TimeZone id=Custom to TimeZone id=Asia/Singapore? I mean the steps to do.
Any Idea or thought would be appreciated

Timezone id
4 REPLIES 4
Rajeev  Shukla
Honored Contributor

Re: Timzone id

Hi,
If you want to change the time zone on the unix server use the command
/sbin/set_parms timezone
this will display the current time zone and you can change then to whatever you like. Take care you'll have to reboot after that.

Cheers
Rajeev

Michael Tully
Honored Contributor

Re: Timzone id

If you haven't got your TIMEZONE set correctly then you need to fix it using something like 'set_parms' or to try something like this at the top of your script.

# Setting TIMEZONE
if [ -r /etc/TIMEZONE ]
then
. /etc/TIMEZONE
else
PST-8PDT # (Pacific Standard Time)
export TZ
fi
Anyone for a Mutiny ?
sycncs
Advisor

Re: Timzone id

Besides using setparms, you could also use SAM. Go to SAM -> Time and adjust your settings.

Hope this helps.
Bill Hassell
Honored Contributor

Re: Timzone id

The current timezone is settable for any user on the system by changing the enviroment variable TZ. The set_parms and SAM solution simply set TZ for each user when they login. HP-UX always keeps time internally as GMT or Zulu time but it is displayed and set according to the rules in /usr/lib/tztab (see the man page for tztab) so each user can be in a different timezone and it will look normal if TZ is set to the local timezone.


Bill Hassell, sysadmin