Jump to content

Recommended Posts

Posted

Hi, 

A question that I am sure I will still be asking in years to come the joys of regional time and dates...

I have a progressive capture that captures a date time, this is then written to h_custom_21, When I format this date using the formatter I lose the DST value but all the documentation shows is it's in utc no z or anything on the value? 

So I can format the date to show how it is preferred but the time value is 1 hour behind? I have tried this not using h_custom_21 also and going straight from the form field to the formatter but I don't like this option anyway as its open to error when users have different format settings

What is the obvious thing I am missing here?  

 

 

Posted
19 minutes ago, Jim said:

its open to error when users have different format settings

The raw value from the Intelligent Capture answers will not be affected by User Preferences.

Posted

@Jim

In Hornbill, Date/Time values internally are always represented and written to the database in UTC, that is, without any adjustments for timezones, this you can think of as an absolute point in time, relative to the international standard of Coordinated Universal Time (UTC) https://en.wikipedia.org/wiki/Coordinated_Universal_Time

Throughout the system this is our standard and allows to display any date/time value in any local time and removes the need for us to try and track Timezones along with the date/time value.  So all you need to do when working with these values is always work with them in UTC for calculations, then, when displaying, or including in a report for output to PDF or Excel, you need to convert the date/time UTC time point into local time. This is why when generating a report and in many other places you are required to specify a timezone. 

Gerry

Posted

I appreciate that but when I write these values to a summary or activity after formatting them, how do I maintain the DST time? 

Posted

For example:

the date time field is h_custom_21 which is obviously formatted by the system it self,


image.png.b259e5562bf025b6b510bff335e4f226.png

but after changing the format like below I lose the hour that it should be when writing the formatted value to activities and summary's

 image.png.0db0641a4f6253a8fe83307b5184d197.png

Posted

Hi Jim,

Thanks for your post.

On our wiki page for how to use Markup, there is a section titled Date Formatting.  When updating either the summary or details of a request from a variable in a BPM workflow, if you surround that variable in a pair of single square brackets, it should be presented in the request summary or description in a format that is based on the user's regional settings.

For example, here is a date variable that is taken from a Date/Time field on a request that includes the extra set of [].

[&[global["flowcoderefs"]["getReqInformation"]["dateLogged"]]]

After the BPM workflow has updated the summary or details, if you were to go into edit mode on the request you will see that the date looks like this

image.png

However, the user with their time zone set to PST will see it as 

image.png

Both the difference in time zone and the date and time formats have been applied.

I hope this helps and works with your scenario.  

  • Like 3

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...