Displaying 5 results from an estimated 5 matches for "gettimezoneoffset".
2006 Jun 14
3
JS variable -> ruby?
I have a little javascipt script to determine a users GMT timezone
offset... is it possible to use that variable in ruby code, in the view?
js script:
<script type="text/javascript">
Now = new Date();
tzOff = Now.getTimezoneOffset();
tzOff = tzOff/60;
</script>
Thanks!
-stirman
--
Posted via http://www.ruby-forum.com/.
2008 May 07
2
Inserting authenticity token into AJAX request params
Hi all. I am trying to find a way to insert an authenticity_token
into the params of an Ajax request before it gets sent.
I''ve got this much:
Ajax.Responders.register({
onLoading: function(req){
if ((req.options.method == ''post'') && !
Object.keys(req.options.parameters).include(''authenticity_token'')){
---->
2006 May 23
0
Passing a browser variable to Rails?
...on,
Background :
I am trying to roll my own fuzzy-time representation algorithm. I want to
pull the Timezone from the browser on page load. I was trying to do it
through javascript, in the form of
"var visitortime = new Date();
document.write("<SOME HTML ELEMENT" + visitortime.getTimezoneOffset()/60);"
+ ">");
and once that was written I would pull it into my RoR page loading. The
reason I''m doing this is that I have some dynamic page calls that need this
info without any prior knowledge of the browser (e.g. Trying not to create
an account and having the info...
2011 Jul 13
14
Using timezone javascript to set Time.zone
I''ve got a javascript that provides me with the timezone for the
client. I want to use this to set Time.zone so that all my times
stored in the database are displayed in the timezone for the client.
So really simplistically
var timezone = jstz.determine_timezone().timezone
Time.zone = timezone.olson_tz
obviously this can''t be done. I''ve taken a look on the web and can
2007 Nov 27
0
12 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_strings.c libswfdec/swfdec_loader.c libswfdec/swfdec_loader_internal.h libswfdec/swfdec_load_object_as.c libswfdec/swfdec_load_object.c libswfdec/swfdec_load_object.h
...ype", "getMinutes", false],
+ ["_global.Date.prototype", "getMonth", false],
+ ["_global.Date.prototype", "getSeconds", false],
+ ["_global.Date.prototype", "getTime", false],
+ ["_global.Date.prototype", "getTimezoneOffset", false],
+ ["_global.Date.prototype", "getUTCDate", false],
+ ["_global.Date.prototype", "getUTCDay", false],
+ ["_global.Date.prototype", "getUTCFullYear", false],
+ ["_global.Date.prototype", "getUTCHours",...