Date Formating to ISO

If i format any given date to ISO, the output date won’t be adjusted to any selected static time zones (it will output the normal UTC date).

I don’t think this is a bug. The simplified extended ISO format

…is always 24 or 27 characters long (YYYY-MM-DDTHH:mm:ss.sssZ or ±YYYYYY-MM-DDTHH:mm:ss.sssZ , respectively). The timezone is always zero UTC offset, as denoted by the suffix "Z ".

-Steve

1 Like

The ISO format output as default is UTC (yes) - just as the “current user time” is based on the users clock. But in bubble console, you can set the date to be outputted in different static time zones. But that is not working.

The ISO implementation was much requested because many tools use this convention to work.

Bubble fragmented the date handling to be : format and time zone.

If this behavior is intended , then why bother to have an option to change the date time zone at all ?

Incorrect. It’s not the “default”. It’s the definition, as indicated in my initial reply.

I don’t know what you mean by “current user time”.

Because it does work for every other format in the list. It simply isn’t applicable to simplified extended ISO format (see definition above). (Ideally, from a UI perspective, the option to specify the output time zone would disappear when simplified extended ISO format was selected.)

ISO format is a data interchange format, and while it’s “human readable”, it’s not intended for human consumption as its ultimate goal. Any system that can read ISO date format should be able to read the value and output the equivalent time for any time zone.

-Steve

… it’s not intended for human consumption as its ultimate goal.

I never said that i am using it for the UI. I am using for a workflow related to a plugin that works with this specific format of date in the backend (in this case).

It simply isn’t applicable to simplified extended ISO format (see definition above).

You are stuck with a definition (look to the bigger picture). Bubble functionality should handle any changes to the date time zone no matter the format of the date (yyyy,dd,m or dd,m,yyyy or iso …etc) (that’s why the time zone option is there). The way it’s put by bubble editor … it should be possible (thats why i see it as bug).

I see it as a UI oversight. Extended simplified ISO format simply doesn’t support time zones. Period. By all means, submit a bug report if it’s something you’d like to see addressed.

1 Like

I am happy to say that i found a good workaround.

On other topics i found that it was impossible to make the string in “ISO format” without making use of this frankenstein: "current user date formatted as 2021"T"current user date formatted as 15:00:00"Z (the plugin was not accepting it either :frowning_face: ).

The custom format does not allow me to type the T or Z.

But i found out that this was possible: yyyy-mm-dd"T"HH:MM:ss"Z"

By using the " i could place the T and the Z.

Now it works as if it was formatted as ISO for the pluging.

Thanks for the time to reply here.

I still think it is a bug and i will try to submit a bug report.

I think you just need to escape those characters by surrounding them in single quotes. You should be able to use the custom format to generate pretty much any output string you want.

-Steve

This topic was automatically closed after 14 days. New replies are no longer allowed.