Shift in calendar time? About reservation calendar


I am quite new with fabmanager, I am having some issues about calendar shifting time.
When any user make a reservation, in the calendar, it shows the correct selected time, but in the confirmation time, it shows with 1 hour added (Why?).

(sorry it is translated to portuguese)

I have tried to see timezone, in the host and the fabmanager image docker, but the fabmanager timezone is with UTC, and I saw that docker update timezone automatically. But Why 1 hour? :thinking:

Brazil didn´t adopted daylight saving time this year (last year it was plus 1 hour at october 2018). Is it causing troubles?

That is causing some problems here about the users by this.

hope to be clear about my problem.

thanks in advance.

Hi Sergio,

Welcome to the fabmanager comunity!
Fab-manager uses the momentjs database for tiomezones, set in 2014… things may have changed since that time, I’ll try to investigate on this and to update the TZ database. I’ll keep you updated.

Hi Silvan,

Thanks for your Fast answer!

The same thing happened when I try to put a resource equipment avaible in the calendar:

This kind of situation, happened in October 2019.

Nice to know about it. In advance, I tried to update the famanager docker image, to use America/Sao_Paulo time zone to see if it would help.

And today, I tried to make resources avaible in calendar again beginning at next month, and that diference did not happened anymore. That is good to know (the problem will not continuing happening for the next month), but would be good to know what caused that, for anyone that may have the same problem.

Best regards.

Hi Sergio,

This is very strange because I found that the timezone info were updated in november 2018 (not as obsolete as what I thought), so I upgraded the moment-timezone package once again but I’ve not released the changes yet so the fix can’t come from here.
I guess you have correctly configured the TIME_ZONE variable?
I’ll keep you updated when I’ll release the new version, do not hesitate to post here if the issues appears again to you.

Hi Silvan,

Yes I have configured TIME_ZONE=brasilia (on /apps/fabmanager/config/env)

May I have to change to São Paulo (is the place that I am now, TIME_ZONE=São Paulo ?).

Now the server here has updated the time, and the next month, the same problem will happen.

I saw the time on the linux server where the application is hosted, and the time is correct, I do not know how to correct it yet.

thanks in advance.

Hi Sergio,
I think that Brasilia (-with a capital B) is the correct value for your location (UTC -03:00), based on the rake time:zones:all command.

Nevertheless, I’ve looked around the timezone system in ruby a little bit more, and it seems that it is using the zoneinfo folder, which may be located in /usr/share/zoneinfo on most unix systems. If you use debian/ubuntu, you may try to do apt-get update tzdata to get the last, up-to-date, timezone and daylight saving time info.

Can you have a look at this and keep me updated?

Hi Silvan,

YES, for sure!

I am using the Ubuntu 14.04 as host.

I saw that in /usr/share/zoneinfo , there is no Brasilia time zone, only Sao_Paulo (-2), Campo_Grande (-3), Bahia and Cuiaba.

May it have a kind of incompability?

in the fabmanager « env » file, the TIME_ZONE=brasilia (wich is one word), if I change it for São Paulo, would it be « Sao_Paulo »? what is the referece word? where I can see the possibilities?

Well, I’m not sure that the timezone must be listed in /usr/share/zoneinfo because the ruby tzinfo gem, which is a wrapper between your system TZ database and the fab-manager software, may be using its own namings. Only the rake time:zones:all command can give you the correct values to use in fab-manager’s env file.

use docker-compose run --rm fabmanager bundle exec rake time:zones:all to see all these values.


Here is the result:

We can see that, there is only Brasilia time.

I will try to change to Mondevideo (on Uruguai) to see if it continues.

I was thinking here, does the frontEnd of fabmanager, has any part that get the computer web browser time (or samething like that)? If does, may it be the resposible for the problem?

I have another subject, about fabmanager, but I do not know if I have to make another post on the forum, or can I ask here?

I would like to change the machine reservation time period, by default is made by hour, is that possible to change the reservation time period for half and half hour? For a user make only half hour reservation?

We beleive that it would be very helpfull for the users frequency of the lab here.

Yes, the moment.js library is used in many parts of the front-end (public calendar, cookies alert, list of plans, statistics, shopping cart and coupons). It fetches the date from the client browser (which relies on the client operating system date).

So it could be responsible of some problems if it is not correctly configured. Especially, your first screenshot display an error in the « shopping cart » component, so it may be the cause of the issue.

Concerning your second screenshot, the admin calendar is not using moment.js but directly the native browser date in some parts on the code so maybe it’s linked too…

Do you have a way to check if the issue is linked to that?

Concerning your other question, I’ll answer here, but please yes: a separate thread would be better for the next time :wink:
Starting with fab-manager v4.3, the next version to be released in some days, you’ll be able to configure a custom duration for reservations slots, using the SLOT_DURATION environment variable. I’ll keep you updated when it will be released.


oh, nice, so it may be the cause?

I changed the TIME_ZONE to Montevideo (It shoud not have daylight saving time included and is the same -3:00 as Brasilia), and it had no change. The problem happened, when the daylight saving period « started » (but this year, it did not exist). So I believe would be a differencebetween server and user machine, but checking here, both are the same time.

I still do not know what would be.

Thanks, next I will open a new one!

Very good to know about this news! thanks in advance. I will be waiting anxiously.

And I can say here, this system, the Fabmanager, is very impressive, very good and very well done. Congratulations to you and to all community that is helping to develop it.

:clap: :clap: :clap: :clap:

Thanks for your support! We do our best to provide a good software that really helps fablab managers and this is encouraging that people use it and like it.

Concerning your timezone issue, can you give me the dates when the DST occurs this year and next year, in Brazilia? I’ll setup a test environment to try to reproduce it.

Hi @Sergio

It was so much longer that what I imagined but I’ve finally released v4.3.0 of Fab-manager. You can update your installation to use the SLOT_DURATION variable. It may also fix your DST issue, but I’ll be very happy if you can feedback me about this.

Oh very nice!!! thanks for notify me Silvan!! I will as soon as possible update it here! Then I will feed you back about it!

Thanks for all!

1 « J'aime »