Closed allaire closed 7 years ago
@allaire Thank you for reporting! I'll debug this soon. Do you use a calendar different from Calendar.current
?
No I don't :) Calendar.current is gregorian.
-- Mathieu Allaire
On November 28, 2016 at 20:46:25, Naoto Kaneko (notifications@github.com) wrote:
@allaire https://github.com/allaire Thank you for reporting! I'll debug this soon. Do you use a calendar different from Calendar.current?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/naoty/Timepiece/issues/75#issuecomment-263452165, or mute the thread https://github.com/notifications/unsubscribe-auth/AASlTeS544eWwkxxSRdfe5ONFfF1KGEaks5rC4PwgaJpZM4K917q .
@naoty maybe it was caused because the date returned was not in UTC 0 format, and since your method specifically put it in UTC+0, it was changed the day of what I was expecting.
Maybe the timezone should be optional?
@allaire If you don't offer codes to regenerate this bug, I can't continue to debug.
I just debugged an issue I have with
.date(inFormat:)
, it returns the wrongweekday
.I pin pointed the issue to this line:
https://github.com/naoty/Timepiece/blob/master/Sources/String%2BTimepiece.swift#L21
If you remove it, it works as expected (I think it uses the current calendar by default, maybe this line overwrites it).