I am developing Rails-4 application
where I created 1 form for users.
Users from all over around the world
. Now, I have to get timezone
also of users which fill form without enter or select timezone
.
I already used javascript cookies method
and its work perfect like below code:
function set_time_zone_offset() {
var current_time = new Date();
$.cookie('time_zone', current_time.getTimezoneOffset());
}
But problem when someone not allow cookies or clear cookies of them browser at that time issue of timezone. Timezone get blank that i have issue in my application.
now, without timezone set in cookies
, is there any way to get timezone in hidden field which post with form so i can save it.
Thanks