Time Zone Question - Where is the User time zone set and confirmed apart from System property?

vinitha3
Tera Guru

find_real_file.png

The system gets set this time zone only. How is this set? No use even when we set the User record.

4 REPLIES 4

Vladimir Kobeti
Giga Guru

Hello,



actually this is not a system property, but a property on sys_user record.



Have a look to sys_user.time_zone



Cheers V.


Hello ,



If we set the user's timezone in sys_user, then it take this timezone from here else it take system timezone for user.



If we change the timezone from the setting bar(above pic) where it is saved temporally?



I applied cache.do but the timezone din't change. It is also not set with user preferences.


If it is set with session, how to get the value from there?


Hi,



understood now



I think it is quite well described here: http://wiki.servicenow.com/index.php?title=Using_Time_Zones#gsc.tab=0



If you change it via the picker, it is stored in the Session only and probably never makes it to the database.


The only way how you can find it via script is via the gs.getSession() call:


E.g.:


gs.getSession().getTimeZone() -> returns "sun.util.calendar.ZoneInfo[id="Canada/Pacific",offset=-28800000,dstSavings=3600000,useDaylight=true,transitions=189,lastRule=java.util.SimpleTimeZone[id=Canada/Pacific,offset=-28800000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]"



Hope this helps!


Vladimir


ashish211
Tera Contributor

You can set it from sys_user form   or can set under my profile in navigation.