time zone

Time is off in a weird way when I run work flows.

MongoDB as I understand is UTC only and it does not care about anything else. So it is up to application to adjust for timezone differences.

My server:

Mon Apr 20 14:09:48 EDT 2015

Mongo:

ISODate 2015-04-20T18:10:38.7532"

Fireworks:

same as mongo

Is there anything I can do to get conversion going between UTC and EDT?

Hi,

Datetimes are a bit tricky; FWS has not been the greatest at handling this in the past. The issue is that while Mongo supports ISODate objects, JSON does not have a standard format for dates. The best policy would probably have been for FWS to use Mongo’s ISODate throughout such that the dates stored would be rich objects that could be converted easily between time zones (by the application). For a mix of reasons, this is not always the case and FWS sometimes includes string representations of UTC time.

You can certainly convert on the application side; FWS does this in its serializers via the “reconstitute_dates” method, which can turn string representations into Python date objects. However, everything is still converted client side.

If there’s any specific change that could be made to help this process, please let me know

···

On Monday, April 20, 2015 at 11:14:57 AM UTC-7, [email protected] wrote:

Time is off in a weird way when I run work flows.

MongoDB as I understand is UTC only and it does not care about anything else. So it is up to application to adjust for timezone differences.

My server:

Mon Apr 20 14:09:48 EDT 2015

Mongo:

ISODate 2015-04-20T18:10:38.7532"

Fireworks:

same as mongo

Is there anything I can do to get conversion going between UTC and EDT?

Hi Anubhav,
I forked fireworks project and implemented fix for time zone.
It works on client side in fw_serializers.py module.
My question is this:
I am leaving mongo iso dates to be as they are UTC tz. I am on the fly applying an offset in tz in reconstitute_dates and that works correctly in gui and on command line.
One thing that I would like to implement is ability on the setup of module as py library dynamic discovery of local tz and some sort of template variable in form like this
ET = pytz.timezone(“America/New_York”)
that could be utilized for calculating offset.

Your thought on how this can be done?

–sasha

···

On Wednesday, April 22, 2015 at 6:43:07 PM UTC-4, Anubhav Jain wrote:

Hi,

Datetimes are a bit tricky; FWS has not been the greatest at handling this in the past. The issue is that while Mongo supports ISODate objects, JSON does not have a standard format for dates. The best policy would probably have been for FWS to use Mongo’s ISODate throughout such that the dates stored would be rich objects that could be converted easily between time zones (by the application). For a mix of reasons, this is not always the case and FWS sometimes includes string representations of UTC time.

You can certainly convert on the application side; FWS does this in its serializers via the “reconstitute_dates” method, which can turn string representations into Python date objects. However, everything is still converted client side.

If there’s any specific change that could be made to help this process, please let me know

On Monday, April 20, 2015 at 11:14:57 AM UTC-7, [email protected] wrote:

Time is off in a weird way when I run work flows.

MongoDB as I understand is UTC only and it does not care about anything else. So it is up to application to adjust for timezone differences.

My server:

Mon Apr 20 14:09:48 EDT 2015

Mongo:

ISODate 2015-04-20T18:10:38.7532"

Fireworks:

same as mongo

Is there anything I can do to get conversion going between UTC and EDT?

Hi Anubhav,
Do you want timezone client addon to be merged for eval into the project?
Just let me know…

···

On Monday, April 27, 2015 at 10:51:48 AM UTC-4, [email protected] wrote:

Hi,

Datetimes are a bit tricky; FWS has not been the greatest at handling this in the past. The issue is that while Mongo supports ISODate objects, JSON does not have a standard format for dates. The best policy would probably have been for FWS to use Mongo’s ISODate throughout such that the dates stored would be rich objects that could be converted easily between time zones (by the application). For a mix of reasons, this is not always the case and FWS sometimes includes string representations of UTC time.

You can certainly convert on the application side; FWS does this in its serializers via the “reconstitute_dates” method, which can turn string representations into Python date objects. However, everything is still converted client side.

If there’s any specific change that could be made to help this process, please let me know

On Monday, April 20, 2015 at 11:14:57 AM UTC-7, [email protected] wrote:

Time is off in a weird way when I run work flows.

MongoDB as I understand is UTC only and it does not care about anything else. So it is up to application to adjust for timezone differences.

My server:

Mon Apr 20 14:09:48 EDT 2015

Mongo:

ISODate 2015-04-20T18:10:38.7532"

Fireworks:

same as mongo

Is there anything I can do to get conversion going between UTC and EDT?

Hi Anubhav,
I forked fireworks project and implemented fix for time zone.
It works on client side in fw_serializers.py module.
My question is this:
I am leaving mongo iso dates to be as they are UTC tz. I am on the fly applying an offset in tz in reconstitute_dates and that works correctly in gui and on command line.
One thing that I would like to implement is ability on the setup of module as py library dynamic discovery of local tz and some sort of template variable in form like this
ET = pytz.timezone(“America/New_York”)
that could be utilized for calculating offset.

Your thought on how this can be done?

–sasha

On Wednesday, April 22, 2015 at 6:43:07 PM UTC-4, Anubhav Jain wrote:

Do you want timezone client addon to be merged for eval into the project?
Sure, that would be great!

Regarding the time zone config, maybe it is something that can be added to the FWConfig.yaml (see fw_config.py or http://www.pythonhosted.org/FireWorks/config_tutorial.html)? e.g. add something like TIME_ZONE_SETTING=America/New_York

Best,

Anubhav

···

On Tue, May 12, 2015 at 7:32 AM, [email protected] wrote:

Hi Anubhav,
Do you want timezone client addon to be merged for eval into the project?
Just let me know…

On Monday, April 27, 2015 at 10:51:48 AM UTC-4, [email protected] wrote:

Hi Anubhav,
I forked fireworks project and implemented fix for time zone.
It works on client side in fw_serializers.py module.
My question is this:
I am leaving mongo iso dates to be as they are UTC tz. I am on the fly applying an offset in tz in reconstitute_dates and that works correctly in gui and on command line.
One thing that I would like to implement is ability on the setup of module as py library dynamic discovery of local tz and some sort of template variable in form like this
ET = pytz.timezone(“America/New_York”)
that could be utilized for calculating offset.

Your thought on how this can be done?

–sasha

On Wednesday, April 22, 2015 at 6:43:07 PM UTC-4, Anubhav Jain wrote:

Hi,

Datetimes are a bit tricky; FWS has not been the greatest at handling this in the past. The issue is that while Mongo supports ISODate objects, JSON does not have a standard format for dates. The best policy would probably have been for FWS to use Mongo’s ISODate throughout such that the dates stored would be rich objects that could be converted easily between time zones (by the application). For a mix of reasons, this is not always the case and FWS sometimes includes string representations of UTC time.

You can certainly convert on the application side; FWS does this in its serializers via the “reconstitute_dates” method, which can turn string representations into Python date objects. However, everything is still converted client side.

If there’s any specific change that could be made to help this process, please let me know

On Monday, April 20, 2015 at 11:14:57 AM UTC-7, [email protected] wrote:

Time is off in a weird way when I run work flows.

MongoDB as I understand is UTC only and it does not care about anything else. So it is up to application to adjust for timezone differences.

My server:

Mon Apr 20 14:09:48 EDT 2015

Mongo:

ISODate 2015-04-20T18:10:38.7532"

Fireworks:

same as mongo

Is there anything I can do to get conversion going between UTC and EDT?

–

You received this message because you are subscribed to the Google Groups “fireworkflows” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To view this discussion on the web visit https://groups.google.com/d/msgid/fireworkflows/5e473cd8-6d96-4379-9b72-12553ec90905%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

1 Like