1
0
-1
Hi All,
On the submission confirmation page I would like to be able to display the server timezone after the submission time so that international or interstate clients will be aware that the time displayed is not their local time.


For example, instead of:

Completed: 1:46 PM, Wednesday 5 March 2014
I would like:

Completed: 1:46 PM, Wednesday 5 March 2014 - AEDT
or

Completed: 1:46 PM, Wednesday 5 March 2014 - UTC/GMT +11 hours

I tried changing the Velocity code in the confirmation page, from:

Completed: $format.date($submission.getTimeFormCompleted(), "h:mm a, EEEE d MMMM yyyy")
to

Completed: $format.date($submission.getTimeFormCompleted(), "h:mm a, EEEE d MMMM yyyy z")
wherezspecifies the timezone in the date format. But I get:

Completed: 1:46 PM, Wednesday 5 March 2014 EST
I'm guessing the timezone might not be stored in the Date object returned by getTimeFormCompleted() and it's just going to the default, is there another way I could get this information?
Cheers.

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1
      1. Jye Cusch
        As it turns out the timezone I was getting was correct (EST), it stands for 'Eastern Summer Time (NSW)' not 'Eastern Standard Time (USA)'. I have removed the confusion in my final version of the page by putting in the following line:

        Completed: $format.date($submission.getTimeFormCompleted(), "h:mm a, EEEE d MMMM yyyyzzzz")

        Which gives something like the following:

        Completed: 1:35 PM, Wednesday 2 April 2014 - Eastern Summer Time (New South Wales)

        By having the full timezone name, the confusion between the two versions of 'EST' is removed.
      CommentAdd your comment...