Jump to content

Date Time format inconsistencies


Recommended Posts

British summer is here (apparently), and now that I'm working on code that relies on dates and times of change requests I've noticed that different formats are being shown depending on what I query.

E.g. If I query a request using '' I get:

Link to comment
Share on other sites

darn it, somehow it posted whilst I was still typing, and it wouldn't allow me to edit it :)

 

Anyhoo, here's the full post:

 

British summer is here (apparently), and now that I'm working on code that relies on dates and times of change requests I've noticed that different formats are being shown depending on what I query.

E.g. If I query a request using 'apps/com.hornbill.servicemanager/Requests'  - smGetRequests' I get:

h_datelastmodified      : 2020-04-01T08:17:49.000Z

If I query an asset using 'data - entityBrowseRecords2' I get:

h_last_updated      : 2020-04-01 08:41:47

Or 'apps/com.hornbill.servicemanager/Requests - smGetReqDetails2' I get this stored in RequestDetails:

h_datelastmodified        : 2020-04-01 08:17:49

and this within the 'requestcalltype'

h_start_time   : 2020-04-01 10:00:00

but 'requestBpm' shows:

lastUpdated  : 2020-04-01 05:46:33Z

 

I've seen other posts mention about wiki markup and date time formatting.  UTC formatting is no problem.  In fact it's better for me as this can be easily converted.  The problem is that other date formats such as those shown above are stored in GMT format (probably based on our profile), it's inconsistent.

It would be nice if they were consistent across the board (all UTC or all specified by our profile).  Is there anything I can do to our setup (instance) to correct this?

Or do I just have to assume that if times are not in UTC format that they are assigned as GMT (based on our profile)?  That's not great as I would therefore have to include additional code to handle the date check and BST each time I decide to use said values.

 

Link to comment
Share on other sites

Hi Bernie,

The dates are stored in the database in UTC format.  There may be some differences between APIs and how they retrieve and output the dates, depending on their use.  The profile settings for a user should only apply to the UI and shouldn't directly affect an API call.  

I'll see if I can find anything more to add from our development teams.

James

Link to comment
Share on other sites

  • 2 weeks later...

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