datetime - Current date/time in Java under Citrix Xenapp 6.5 -
we maintain legacy java application has migrated xenapp 6.5 platform.
but when display current time displaying server time , not user's time on powered shared desktop.
for example, user in timezone offset 9.5, when outputting timezone displayed 10.
we have tried:
timezone.getdefault().getid()); system.getproperty("user.timezone"));
and getting time by:
private final static dateformat dateformat = new simpledateformat("dd/mm/yyyy hh:mm:ss"); private calendar intcal; intcal = calendar.getinstance(); intcal.settimeinmillis(system.currenttimemillis()); string df = dateformat.format(intcal.gettime());
is there offical way user's time?
also using vbs outputs same:
strcomputer = "." set objwmiservice = getobject("winmgmts:" _ & "{impersonationlevel=impersonate}!\\" & strcomputer & "\root\cimv2") set coltimezone = objwmiservice.execquery("select * win32_timezone") each objtimezone in coltimezone wscript.echo "offset: "& objtimezone.bias / 60 next
you need make sure timezone redirection enabled server session uses timezone of client device. in xenapp 6.5 have turn on in 2 places, in both citrix specific xenapp policies , windows rds policies.
the following article shows how in production environment setting gpos configure both policy settings:
http://support.citrix.com/article/ctx126099
however if want test on single server can edit locally. i.e. first open citrix appcenter then:
- select policies node
- select user tab
- select default "unfiltered" policy
- click edit
- in edit policy dialog select settings tab
- scroll down "time zone control" category , select it.
- look "use local time of client" setting , click add.
- click ok on add dialog pops up.
- click ok on edit policy dialog close it.
the similar step 12 in support article linked, run gpedit.msc:
- select node: computer configuration\administrative templates\windows components\remote desktop services\remote desktop session host\device , resource redirection
- edit "allow time zone redirection" policy, set enabled.
once timezone redirection setup should able use standard date/time apis in development language choose.
Comments
Post a Comment