Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7736215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:41:25+00:00 2026-06-01T07:41:25+00:00

Using RAILS 2.2 Hello I am having an issue where my dates are being

  • 0

Using RAILS 2.2

Hello

I am having an issue where my dates are being set to Time.now when I update a call. This is because the Update statement is only passing the time, not the datetime.

You can see bellow

  • [Issuereported_date] = ’11:36:00′
  • [Issuelogged_Date] = ’11:36:56′

The time that is being passed isn’t random, it is the time part of the datetime which should have been passed.

Processing IssuesController#update_general (for localhost at 2012-03-02 11:38:53) [POST]
  Session ID: BAh7CzoPYZWR7ADoOY2xpcjo6Rmxhc2g6OkZsYXNo%0ASGFzaHsABjoKQHVzZWR7ADoOY2xpZW50X2lkaQY6D0ASGFzaHsABjoKQHVzZWG9yIFdpbGxpYW1z--29udGFjdF9pZGHVz
  Parameters: {"commit"=>"Save", "action"=>"update_general", "id"=>"0004", "controller"=>"call/issues", "issue"=>{"ResolutionID"=>"", "EstFixDate"=>"", "ResolutionVersion"=>"", "SeverityID"=>"3", "ResolutionNotes"=>"", "StatusID"=>"1", "Issuelogged_Date"=>"2012-02-12 11:36:56", "CallTypeID"=>"1", "IssueBody"=>"sdg", "Emailsent"=>"1", "IssueHeader"=>"td", "UserID"=>""}}
  [4;35;1mSQL (0.000000)[0m   [0mSELECT c.COLUMN_NAME as ColName, c.[DEFAULT] as DefaultValue, d.DOMAIN_NAME as ColType, c.WIDTH as Length FROM SYS.SYSCOLUMN c key join (sys.systable t,sys.sysdomain d) WHERE t.TABLE_NAME = 'Contact' ORDER BY column_id[0m
  [4;36;1mContact Load (0.000000)[0m   [0;1mSELECT TOP 1 * FROM Contact WHERE (Contact.[ContactID] = 12311) [0m
  [4;35;1mSQL (0.000000)[0m   [0mSELECT c.COLUMN_NAME as ColName, c.[DEFAULT] as DefaultValue, d.DOMAIN_NAME as ColType, c.WIDTH as Length FROM SYS.SYSCOLUMN c key join (sys.systable t,sys.sysdomain d) WHERE t.TABLE_NAME = 'CALL_Issue' ORDER BY column_id[0m
  [4;36;1mCall::Issue Load (0.000000)[0m   [0;1mSELECT * FROM CALL_Issue WHERE (CALL_Issue.[IssueID] = '0004') [0m
  [4;35;1mSQL (0.000000)[0m   [0mSELECT @@ROWCOUNT AS AffectedRows[0m
  [4;36;1mCall::Issue Update (0.015000)[0m   [0;1mUPDATE CALL_Issue SET [IssueBody] = 'sdg', [LastEdited_By] = 12311, [Issuereported_date] = '11:36:00', [PlatformID] = NULL, [ApplicationID] = 387, [SLAMet] = 0, [HandHeldID] = NULL, [StatusID] = 1, [ResolutionNotes] = '', [SeverityID] = 3, [Comments] = NULL, [Emailsent] = 1, [ModuleID] = NULL, [Issuelogged_Date] = '11:36:56', [BeginProjectWork] = 0, [ResolutionVersion] = NULL, [EstFixDate] = NULL, [ClientUserID] = 12311, [ClientID] = 1, [IssueHeader] = 'td', [UserID] = NULL, [ClientComments] = NULL, [Issuelogged_by] = 12311, [CallTypeID] = 1, [priority] = 3, [IssueClientRef] = NULL, [ResolutionID] = NULL, [ClientSpecific] = 0, [IntComments] = NULL WHERE [IssueID] = 0004[0m
Redirected to http://localhost:3000/call/issues/0004
Completed in 0.10900 (9 reqs/sec) | DB: 0.01500 (13%) | 302 Found [http://localhost:3000/call/issues/update_general/0004]

As you can see, I’ve tried setting the Issuelogged_Date in my update, although – same thing happens – it just passes the time, and not the datetime.

I’m really stuck on what to do! Any help would be appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:41:26+00:00Added an answer on June 1, 2026 at 7:41 am

    We found that this was down to the Sybase, anywhere Adapter gem we were using.

    We modified line 232 so Time was correctly (or how we wanted it to be) passed to the database.

    Changes:

    when Time then "'#{value.strftime("%H:%M:%S")}'"
    

    now looks like:

    when Time then "'#{value.strftime("%Y-%m-%d %H:%M:%S")}'"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello I've been a Rails developer on Windows for quite some time now, but
Hello friends i need a book/ tutorials for rails without using scoffold. All the
Hello I'd like to build a Rails Brick using a Sheevaplug from Marvell (O.S.
Using Rails ActiveRecord, am wanting to calculate the time between two datetime fields within
Update: Originally, this post was using Books as the example entity, with Books1 ,
I'm attempting to get my first hello world rails example going using the rails'
I'm having trouble sending mail using SMTP from a Rails app. I have a
I'm using Rails built in I18n (Simple backend). I've set the default locale to
I have the following statement in Rails 3 using an SQLite3 database: word =
using rails 2.3.8. I'm getting this: [ [0] 0, [1] { name => Section,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.