I have a script that runs in different countries to figure out the local time offset from GMT (to determine location). For that goal I get GMT time by polling a web server, it return time in a format like: "28 Aug 2020 08:39:04" then I use In format("28 Aug 2020 08:39:04") to return 28Aug2020:08:39:04 as a datetime stamp. Now I can subtract local time - GMT time to get the time difference. This works fine in Europe and the USA but when my Korean colleague runs In format("28 Aug 2020 08:39:04") he gets . as response. Probably JMP not recognizing the month. Is there a robust way to convert this char date to a date format that works around the world?
I see the option of using <Automation and ScriptingRe: Use of in format() in different countries
Ok, this works, thanks!
and maybe the best answer is to use @bryan_boone answer How to get the timezone from user's computer/laptop using http request.
edit: it may still need the preference!
actually, here's how I found the dialog...
via control panelvia control panel
this is the only way I've found to make it work.
preferences(Use JMP Locale Settings( 1 ));
Informat( "28 Aug 2020 08:39:04", "ddMonyyyy h:m:s" );
You can set an english language version of Windows to Korean like this:
region settingsregion settings
I hope I can set it back...
@Audrey_Shull - I think the <Re: Use of in format() in different countriesUnfortunately that doesn't work for my Korean colleague. He gets .Re: Use of in format() in different countries
I can't test it, but I think you want this:
Informat( "28 Aug 2020 08:39:04", "ddMonyyyy h:m:s", <<USELOCALE></USELOCALE>
which should mean "don't use the user's locale". The scripting index example shows the unary send operator, <<, so it is probably required too.
@XanGregg