Set locale time zone

237 views
Skip to first unread message

J.M.

unread,
Nov 21, 2016, 12:25:45 PM11/21/16
to Fujitsu RunMyProcess Developer Community
Hi,


I'm buildeing a project for a customer which is in a different timezone (I'm in Spain, and they are in Mexico).
I'm saving in a collection dates from Freemarker like 1478649600 (which could be for example 2016/11/04), and it is working fine, but when they see in Mexico they see 2016/11/03 instead.
I think that getting the seconds from a date sets the time as 00:00 by default, and as they have 7 hours less than Spain, I think they are seeing the timestamp 7 hours early, that in the example would be 2016/11/03 at 17:00.
Am I right?

So, my question is how can I get that they can see the correct date?


Thanks in advance and regards.

Pankaj Kumar

unread,
Nov 22, 2016, 6:55:55 AM11/22/16
to Fujitsu RunMyProcess Developer Community
Hi,

Since you are using Date, it is going to be changed as per the user timezone. If you want to see the same date (in different timezone), please store the date in "String" format ("2016/11/03") in collection.

Thank you,
Pankaj Kumar
Fujitsu RunMyProcess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/417e50fa-b7e8-43ea-b765-a6e4a24111ae%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Javier Martín

unread,
Nov 22, 2016, 10:17:56 AM11/22/16
to Fujitsu RunMyProcess Developer Community
Hi Pankaj,

In fact, I'm saving the date in timestamp format because it's the way I found for correctly use the between filter in the report widget.
Maybe I've explained my problem not good enough. 
For solve myI'm saving the date in my collection doing something like this:
${get_time(now("20161104"), "yyyyMMdd")?number}
And that's saving 2016/11/04 01:00:00 in seconds, so when our mexican customers see the date they see  2016/11/03 18:00:00.

I need to save the date as timestamp, so How can I modify the freemarker line, in order to get correct amount of seconds for getting the date does not change when seen in Mexican timeZone.


Thanks again,
Kindly Regards.

You received this message because you are subscribed to a topic in the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this topic, visit https://groups.google.com/a/runmyprocess.com/d/topic/supportforum/oYfNUS7UZrM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to supportforum+unsubscribe@runmyprocess.com.

To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.

Richard Manga

unread,
Nov 23, 2016, 5:29:01 AM11/23/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Good morning Sir,
In order to Manage this issue, usually, for each date, we store two values in the collection: 
- timestamp value (eg:1478649600)
- string value (eg: "2016/11/04")
This will allow you to display the correct day in the string field.
Regards,
Richard

J.M.

unread,
Nov 23, 2016, 8:47:27 AM11/23/16
to Fujitsu RunMyProcess Developer Community, javiermm...@gmail.com
Hi Richard,
Good to read you


How could this help me?
I mean, suppose I store two dates, one as a string, one as a timestamp.
In order to use the date filter options (between filter, for example) in a report widget, I need to store the date as timestamp for a correct performance.

This is de date I show, because I need to use the date filters. So in case I have another date as a string, what would his purpose be?
Showing it in addition to the other one? If so, that's not acceptable for my application.

In other case, are you proposing I use the string date for showing it in the report widget? If so, that's not acceptable in my case, because the use of between filter is a requirement for my application and it must be usable.

So what is the purposse of adding a new date?
And again, returning to my previous post, what I'm looking for, is a way in which I can tell in freemarker when I use the get_time function,
${get_time(now("20161104"), "yyyyMMdd")?number} that the correct result should have seconds elapsed from 1 Jan 1970, having the hour of Mexico


Thanks again,
Best Regards

Richard Manga

unread,
Nov 23, 2016, 11:56:56 AM11/23/16
to suppor...@runmyprocess.com, Javier Martín
Good morning Sir,
As you know, timestamp is universal.
So, based on the place where you are, filters will work differently.
I think that the string date will not be usefull for the filters, but will be usefull in order to communicate additional
information (local day creation).
If you have any other question, please don't hesitate to contact us.
Best Regards,
Richard

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
Reply all
Reply to author
Forward
0 new messages