Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix odd time behavior #49

Merged
merged 1 commit into from
Jan 17, 2014
Merged

Fix odd time behavior #49

merged 1 commit into from
Jan 17, 2014

Conversation

asenchi
Copy link
Owner

@asenchi asenchi commented Jan 17, 2014

With the advent of #48, timestamps in the ISO8601 format (or any value containing a ":") are now quoted. However, Scrolls own behavior of adding a timestamp with Scrolls.add_timestamp = true circumvented this behavior. Example:

Given this code (and some debug output in scrolls):

Scrolls.log(:now => Time.now.iso8601, :timestamp => "f")
Scrolls.add_timestamp = true
Scrolls.log(:timestamp => "t")

Before this PR:

projects/testscrolls : ./test.rb
{:now=>"2014-01-17T00:49:14-05:00", :timestamp=>"f"}
now="2014-01-17T00:49:14-05:00" timestamp=f
{:now=>2014-01-17 05:49:14 UTC, :timestamp=>"t"}
now=2014-01-17T05:49:14Z timestamp=t

After the changes here:

projects/testscrolls : ./test.rb
{:now=>"2014-01-17T00:50:18-05:00", :timestamp=>"f"}
now="2014-01-17T00:50:18-05:00" timestamp=f
{:now=>2014-01-17 05:50:18 UTC, :timestamp=>"t"}
now="2014-01-17T05:50:18Z" timestamp=t

asenchi added a commit that referenced this pull request Jan 17, 2014
@asenchi asenchi merged commit 1f914c1 into master Jan 17, 2014
@asenchi asenchi deleted the odd-time-behavior branch January 17, 2014 05:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant