Wrong time zone for non root user


 
Thread Tools Search this Thread
Operating Systems Solaris Wrong time zone for non root user
# 1  
Old 12-18-2013
Wrong time zone for non root user

I have a Solaris-11 zone, which is newely build. Since I am in PST time zone, so I set it with this command. It shows me date correctly with correct time zone, but when I switch it to a non root user and run below java command, it is not showing correct time zone. Not sure, how to set it.
Code:
root@data_ora56:~# svccfg -s svc:/system/environment:init setprop environment/TZ = astring: US/Pacific
root@data_ora56:~#svcadm refresh svc:/system/environment:init
root@data_ora56:~# grep TZ /etc/default/init
TZ=US/Pacific
root@data_ora56:~# su - asmtbuser
 asmtbuser@data_ora56:~$ /asm/apps/Oracle/Middleware/10.3.5/jdk160_24/bin/java DateConv
en
sun.util.calendar.ZoneInfo[id="GMT-08:00",offset=-28800000,dstSavings=0,useDaylight=false,transitions=0,lastRule=null]
Wed Dec 18 15:34:48 GMT-08:00 2013 
 false
Wednesday, 12/18/2013 03:34 PM GMT-08:00 -----> I want this to be in PST
asmtbuser@data_ora56:~$ date
Wed Dec 18 15:34:56 PST 2013
asmtbuser@data_ora56:~$

# 2  
Old 12-19-2013
Quote:
Originally Posted by solaris_1977
-----> I want this to be in PST
The time zone setting is a simple environment setting of the "TZ" variable, which is otherwise in no way special to the shell. I suppose the setting is not correct because its default is overwritten by some configuration file.

Have a look in ~/.profile, ~/.kshrc, ~/.bashrc and the like. Perhaps somewhere the wrong TZ value is set.

I hope this helps.

bakunin
# 3  
Old 12-19-2013
What happens when your JAVA_OPTS environmental variable includes "-Duser.timezone=US/Pacific"?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How to find User disconnection root cause at particular time.?

Hi Guys, I need to find out User disconnection cause at particualr time 08:50:49 CET . from various site(Location) on one Server. My Server is :- Solaris 10 64BIt Sparc. below is only log I found at /var/adm/message I er started by mfg on batch. (4281) Dec 12 08:47:49 server68... (1 Reply)
Discussion started by: manalisharmabe
1 Replies

2. Shell Programming and Scripting

Convert UTC time into current UNIX sever time zone

Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone. For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies

3. Solaris

showing 2 different time zones in global zone and nonglobal zone

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

4. Solaris

modifying date and time and time zone on solaris 5.10 with (redundant server) veritas

I have a cluster of two Solaris server (veritas cluster). one working and the other is standby I am going to change the date on them , and am looking for a secure solution as it is giving an important service. my opinion is that the active one doesn't need to be restarted (if I don't change the... (1 Reply)
Discussion started by: barry1946
1 Replies

5. Solaris

Increase root filesystem on solaris zone using zpool

I have a solaris zone of 12 GB and i have to increase the / filesystem to 31GB as requested. Earlier I had expanded filesystems other than / by setting quota to new value like "zfs set quota=new value mountpoint" but I am not sure whether its a good practice in zfs because by default in my... (5 Replies)
Discussion started by: vikkash
5 Replies

6. UNIX for Dummies Questions & Answers

Sudo to delegate permission from non-root user to another non-root user

I've been through many threads before i decide to create a separate thread. I can't really find the solution to my (simple) problem. Here's what I'm trying to achieve: As "canar" user I want to run a command, let's say "/opt/ocaml/bin/ocaml" as "duck" user. The only to achieve this is to... (1 Reply)
Discussion started by: canar
1 Replies

7. Solaris

Applying Recommended Patch Cluster to Whole Root Zone

Hi there, Apologies if this question has been asked and answered already but I've not been able to find the thread. Question: Is it possible to apply the Solaris 10 Recommended Patch Cluster to a whole root (non-global) zone locally? I.E. apply the patch cluster from the non-global in... (3 Replies)
Discussion started by: nm146332
3 Replies

8. AIX

Time Zone for a User Different From Server Time

Hi, A server runs on EDT. Can I set a user with time-zone GMT without changing the server time? regards, Roshni (1 Reply)
Discussion started by: RoshniMehta
1 Replies

9. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

10. Shell Programming and Scripting

Compare Last Modified Time across Time Zone

Hi, I'm new to shell script programming, I only have Java programming background. I'm writing a shell script to do file synchronization between 2 machines that located at different time zone area. Both machine were set its time zone according to its geographical location (Eg: server is at... (1 Reply)
Discussion started by: python
1 Replies
Login or Register to Ask a Question