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:

  1. select policies node
  2. select user tab
  3. select default "unfiltered" policy
  4. click edit
  5. in edit policy dialog select settings tab
  6. scroll down "time zone control" category , select it.
  7. look "use local time of client" setting , click add.
  8. click ok on add dialog pops up.
  9. click ok on edit policy dialog close it.

the similar step 12 in support article linked, run gpedit.msc:

  1. select node: computer configuration\administrative templates\windows components\remote desktop services\remote desktop session host\device , resource redirection
  2. edit "allow time zone redirection" policy, set enabled.

once timezone redirection setup should able use standard date/time apis in development language choose.


Comments

Popular posts from this blog

css - SVG using textPath a symbol not rendering in Firefox -

Java 8 + Maven Javadoc plugin: Error fetching URL -

order - Notification for user in user account opencart -