Displaying 20 results from an estimated 70000 matches similar to: "updated_at with client time not server time"
2008 Sep 22
8
TimeZone daylight savings time problems
Here is the following from my console:
>> Time.now
=> Mon Sep 22 11:33:34 +0200 2008
>> Time.now.utc_offset
=> 7200
>> TimeZone[Time.now.utc_offset]
=> #<TimeZone:0x11aea90 @tzinfo=nil, @utc_offset=7200, @name="Athens">
>> Time.now.in_time_zone(TimeZone[Time.now.utc_offset])
=> Mon, 22 Sep 2008 12:34:22 EEST +03:00
(I am in Spain - CET - and
2010 Dec 13
9
created_at, updated_at and MSSQL
Hello,
I am running into a little issue. There is a considerable time
difference between the time that the console is giving me and the time
I am seeing in the created_at and updated_at column in the DB. The
difference is about 5 hours.
I don''t think the problem is in the DB, but I could be wrong.
Am I missing something obvious? Any clues?
-- 
You received this message because you are
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 29
5
Dynamic JS or RJS ?
Hi,
while I search the net for hints I leave this here, probably you will be
faster than me finding an answer.
The next:
I have a static site where I embed a player using an external js
The html:
<script type="text/javascript"
src="http://www.mysite.com/scripts/player.js"></script>
The JS:
if(navigator.userAgent.indexOf("Opera")!=-1){
2013 Feb 07
11
Rails change default time zone.
Hello everyone,
I am using rails 3.2.8.
I want to change time zone to New York time.
I changed following, but didn''t work
#config/application.rb
    config.time_zone = ''Eastern Time (US & Canada)''
    config.active_record.default_timezone = ''Eastern Time (US & Canada)''
If am wrong please clarify.
Thank You!
-- 
You received this message
2007 Apr 19
1
Time zone mapping from TimeZone to TZInfo::Timezone
Hi. Using this:
    <%= time_zone_select("account", "time_zone" %>
I get a list of time zones options, like eg.:
    <option value="Athens">(GMT+02:00) Athens</option>
But as I''m using TZInfo::Timezone, I need to map ''Athens'' to
''Europe/Athens''
I can see that the mapping I''m looking for is
2008 Jul 02
3
update_all not changing updated_at
Hi everyone-
Model.update_all works and changes the records, but it''s not changing
the updated_at field.  Am I doing something wrong or is this by
design?
Thanks,
Dino
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2008 Feb 12
4
Syntax of session's updated_at field ?
What''s the syntax to acquire the updated_at value of a session stored  
in a db?
session.updated_at doesn''t work. can''t find any docs on this.
-- gw
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2009 Apr 04
11
rake aborted! undefined method `empty?' for nil:NilClass
Hi,
I''m getting the next errors, would anyone have any suggestions?
Thanks.
[~/rails/hip]# rake --trace db:migrate RAILS_ENV="production"
(in /home/domain/rails/hip)
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
undefined method `empty?'' for nil:NilClass
/usr/lib/ruby/1.8/erb.rb:469:in `scan''
2008 Jul 08
4
Checking URL with open-uri
Hi,
I allow posting videos to youtube in my app. But before I let them save
into the DB I want to, at least, know that the users put a link to
youtube and that the link is working.
How can I do those verifications with open-uri?
Tried but got some errors...
Thanks.
-- 
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message
2008 Sep 11
2
time value won't come back from UTC
Hi there,
I''m fairly new to RoR, and I seem to be having a problem with :time
types.
I save my times with a time_select on my form, to a time type field on
MySQL.
Rails automatically pulls it back to UTC from my timezone (+02:00),
but when I display it again, it stays at the UTC value, i.e. I enter
in 6:30, and I get 4:30 on my list.
Is it just me, or is this a limitation of the time
2009 Oct 16
5
Rails 2.3 Model.touch(:column) always also updates :updated_at???
Hi,
Am I the only one (i.e. something I do is wrong), or does the touch-
method always update updated_at, even though giving it a column to use
INSTEAD is meant to update just that column???
Thanks,
Michael
2010 Nov 18
7
Rails 3 ActiveRecord queries - I'm missing something very BIG
Hi,
I know I am missing something very big regarding the changes with
respect to activerecord in Rails 3.
I can''t find the explanation. And I''m sure someone will kick my ass for
not
finding the right piece of info in the docs and guides. Please do.
I have a working piece of code but I don''t like it.
So. Very basic association:
class Project < ActiveRecord::Base
 
2006 Dec 11
3
javascript_include_tag -- time stamp
Using, for example,
<%= javascript_include_tag ''prototype'' %>
results in
<script src="/javascripts/prototype.js?1164912447"
type="text/javascript"></script>
I take it the number 1164912447 is the timestamp of the file (in seconds
since the epoch)
Isn''t it redundant to include this information? Isn''t part of the HTTP
2007 Aug 09
3
javascript_include_tag - release number instead of time stamp
I''ve noticed that the major part of my pages'' load time is the
Javascript for prototype and effects. Instead of forcing a reload per
request (by attaching the ?timestamp parameter), I''d like to force
reload this per release.
Right now, I load the CSS and JS manually (without the Rails helpers)
and just append a release number manually. It''s OK, but when I
2009 Mar 31
2
TimeWithZone seems in rails 2.3 seems broken...is this the correct behavior?
My environment.rb contains
config.time_zone = ''UTC''
If my understanding is correct, rails should assume time values coming
from the database are UTC, and since config.time_zone is set to ''UTC'',
it should not try to convert the times.
Instead, rails is assuming that the db values are Eastern (my local
zone) and is incorrectly adding four hours to convert to
2009 Mar 20
1
Getting a Time Zone abbreviation from the full name?
There''s got to be an easier way...
I am building an event manager and as part of it, the user selects the
time zone of the event from a drop-down list using the
time_zone_select helper. This is stored in the events table as a
string.
Because of legacy data which is stored in UTC, I want to keep the
dates and times in the table as UTC but when I display it, I want to
show the abbreviated
2006 Jul 11
8
Stop updated_at from auto updating?
Hi
Is there any way to temporarily stop the updated_at field from being 
updated when a record is modified with ActiveRecord?
I have a date field which is keeping track of when the record data was 
last checked by my application and my app manually updates it, of course 
when I do this the updated_at field is also touched making it fairly 
useless for finding out when the actual data was changed
2008 Sep 29
4
RJS is not loaded
Hello,
I have here an issue which is really critical for me (it for my
university work and I would like to not delete this feature). It based
on a Rails 1.x tutorial which I use now under Rails 2.x. It contains the
refreshment (adding content or records) of an div via RJS/JS.
I access the RJS via (Controller):
respond_to do |format|
format.html { redirect_to :controller =>
2009 Jan 19
3
Attachment_fu: save to a default format
Hi, would anyone have any advices on the next?
I allow users to upload images to my app. I''m using attachment_fu and
MiniMagick.
There''s two things that I''d like to do:
1- No matter what format the original file is I''d like to save it in jgp
format.
2- I want to keep all images limited to say 1000px width, so resize if
they are bigger.
Is there a way to do