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

problem after last saturday (daylight saving changed) #45

Open
SpiderRodriguez opened this issue Oct 31, 2017 · 0 comments
Open

problem after last saturday (daylight saving changed) #45

SpiderRodriguez opened this issue Oct 31, 2017 · 0 comments

Comments

@SpiderRodriguez
Copy link

Hello,

I am in the Timezone GMT+1 and last saturday occured the change from summertime to wintertime. After that one of my tests stopped working. The test looks like this:

context 'format for 10 days 23 hours 15 minutes 30 seconds' do
  let(:tnow) { Time.now }
  let(:tdiff) { tnow - (tnow - 10.days - 23.hours - 15.minutes - 30.seconds ) }
  it 'returns the correct format' do
    expect(ChronicDuration.output(tdiff, :format => :short)).to eq('10d 23h 15m 30s')
  end
end

The error is

expected: "10d 23h 15m 30s"
got: "11d 15m 30s"

So I suppose this is a problem with the daylight saving. Is there a possibility to circumvent this error?

Thanks in advance

Rudolf Fäder

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

No branches or pull requests

1 participant