Solved

Timezone here ast -4 -what timezone to set then

Posted on 2011-03-18
13
1,054 Views
Last Modified: 2013-12-06
Hi experts.

The timezone here in Puerto Rico is AST -4.   How to set and what timezone to set in Hp-ux version 11.31 and 11.23?
0
Comment
Question by:LindaC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 3
13 Comments
 
LVL 3

Expert Comment

by:Alberto Cortes
ID: 35166963
The timezone is determined by reading the 'TZ' environment variable.

This variable is set when you execute 'set_parms timezone'. Set_parms
edits the file '/etc/TIMEZONE,' which exports the 'TZ' environment
variable. When you reboot after executing set_parms, the file
/etc/TIMEZONE will be read and your TZ variable set to the value you
specified. The value is in the format:

  [:]STDoffset[DST[offset][,rule]]

For example: PST8PDT for the U.S. Pacific Time Zone

See the environ(5) manpage for a detailed description of the format.

Note, the offset for daylight savings time is supplied by the
'/usr/lib/tztab' configuration file.

libc functions like ctime use the 'TZ' variable to determine the timezone
0
 
LVL 8

Author Comment

by:LindaC
ID: 35167005
Hi.  My timezone is AST- 4.  What timezone to set  in order to get AST- 4.
0
 
LVL 8

Author Comment

by:LindaC
ID: 35167141
We use timezone America/Puerto_Rico wchis is ast -4

Waiting for someone who can help me
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:Alberto Cortes
ID: 35167858
Use TZ=AST4
0
 
LVL 8

Author Comment

by:LindaC
ID: 35167916
That is set like this.  but the thing is that when I put export TZ=America/Puerto_rico it gave me the date as 4 hours later.

America/Puerto_Rico is needed in the Oracle Monitoring agent that will monitor the database and the server.

Other solaris servers have set America/Puerto_rico and the agent as America/Puerto_Rico and the hours still the same.

something is wrong here .
0
 
LVL 3

Expert Comment

by:Alberto Cortes
ID: 35168040
Test like this:
1. login
2. export TZ=AST
3. date
To remove just do export TZ=
0
 
LVL 8

Author Comment

by:LindaC
ID: 35168059
It is 2:40 pm (14:40 in military hour) and the test gave this:

[oracle@hpdbdev1 /home/oracle]$ export TZ=AST
[oracle@hpdbdev1 /home/oracle]$ date
Fri Mar 18 18:40:24 AST 2011
[oracle@hpdbdev1 /home/oracle]$
0
 
LVL 78

Accepted Solution

by:
arnold earned 500 total points
ID: 35168308
Try the following:
export TZ="GMT"
date
the issue is that if your TZ specification does not match the timezones that the system knows, it will default to GMT which is likely what you are looking at.

I'm not sure where the timezone info on HP-UX is.
Set your TZ to GMT-4 and that should it for you since you do not have daylight savings changes.
0
 
LVL 78

Expert Comment

by:arnold
ID: 35168435
If you prefer to see AST as the timezone versus GMT-4.
if your timezone info is in /usr/share/zoneinfo
cd /usr/share/zoneinfo
Set your zone to TZ="America/Puerto_Rico"
if you have /etc/localtime
ln /usr/share/zoneinfo/America/Puerto_Rico /etc/localtime
Will do what you need/want.
0
 
LVL 8

Author Comment

by:LindaC
ID: 35168446
sh: /usr/share/zoneinfo:  not found.
0
 
LVL 78

Expert Comment

by:arnold
ID: 35168494
ls -l /usr/share/zoneinfo
This is a data repository and not a command to be executed.
0
 
LVL 8

Author Comment

by:LindaC
ID: 35168501
[oracle@hpdbdev1 /u01/app/oracle/product/agent11g/bin]$ ls -l /usr/share/zoneinf
o
/usr/share/zoneinfo not found
0
 
LVL 3

Expert Comment

by:Alberto Cortes
ID: 35168782
Can you check if your NTP is synching right?

ntpq -p

Should give you an idea where you are, if any NTP clock was configured.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
reinstall 1 98
Unix/bash: scripted arithmetic 13 103
Oracle Finace 3 104
Solaris acount issues 44 75
When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question