Jump to content

Schedules time showing a Z


PeterL

Recommended Posts

Hello,

We have had an issue arise where the schedule time is showing an hour behind and with a z at the end as per below:

image.png.101d1db1aed86e573f0394c7c6c3107a.png

Once in the forms design view however it shows the correct time that has been chosen:

image.png.81cfe8b33d638a9a20479b563d5214e1.png

Due to this some of the notifications sent out are displaying the time incorrectly and some even though it shows the wrong time is still outputting to the notification correctly:

image.png.8b9e624c058cf25452d66d12b4ea839c.png

One that sent out correctly:

image.png.a6fb30844801d280cc8ad458aba47a7b.png

image.png.99d41467302cf23b520adf9c808a7b57.png

Any help would be great thanks.

Link to comment
Share on other sites

Having a look i can see the lates build has updated some time settings:
The latest build of 
Hornbill ESP (3337) has been released to live.
Added email template modifier called formatLocalTime to support formatting of dateTime columns/variables using system defined regional settings. This system modifier uses these system settings (system.regionalSettings.timezone and system.regionalSettings.dateTimeFormat) for formatting.
 

image.png.d4a9c7146c5b3d57462f3d7c045b4bc3.pngimage.png.66b2c2eb2803aaf1e0e1639533acd7c7.png
Nothing above suggest why the time is an hour out but having a look more into this new modifier i can see:

{{.datetimevariable|formatLocalTime}} = Allows formatting of datetime variables using system regional settings (system.RegionalSettings.timezone & system.RegionalSettings.dateTimeFormat), without this formatting the date time will use the DB value (UTC).
 

So does this mean within my template where i am pulling the times:

image.png.954b8b28f95dffb466ccc700ffb1b8cb.png

I will now need to do {{.H_custom_22|formatLocalTime}} ?
Unsure how this would affect it displaying from within the ticket though?

 

Link to comment
Share on other sites

Yes, you need to format dates using the syntax you mentioned anywhere you use date values in email templates. Doers not impact how the date is displayed in UI, on requests, this is only valid for email template configuration.

Link to comment
Share on other sites

29 minutes ago, PeterL said:

why it might be showing in the UI with the time being out by an hour with a z after it

@PeterL afaik, only is you store that date in a non-datetime field... for example if you store a date into Custom A field (which is a varchar type of filed) then it won't be formatted... where do you have it displayed like this?

Link to comment
Share on other sites

@Victor

Thanks for the response i am seeing the date format within the form view:

image.png.24ffcebd42255cf85771624501366aae.png

As for the custom field we are using 22/23 which are identified as DATETIME, we have used it like this for some time now and not had an issue until after the recent build update Hornbill ESP (3337) 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...