Skip to content

Parse date will be different if device Calendar is different Buddhist vs Gregorian #192

@guhungry

Description

@guhungry

For example string "2017-02-17 00:30:00" and format "yyyy-MM-dd HH:mm:ss"
Buddhist Calendar device will be:
1474-02-16 17:47:56 +0000
Gregorian Calendar device will be:
2017-02-16 17:30:00 +0000

The fix can be either way of set calendar to self.implicitCalendar for parser in

  • (NSDate *)dateWithString:(NSString *)dateString formatString:(NSString *)formatString timeZone:(NSTimeZone *)timeZone

or add calendar in parameter in above function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions