mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Calendar date tidyups
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@17092 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
dfcc68b0d0
commit
335592b8d6
2 changed files with 16 additions and 2 deletions
|
@ -588,7 +588,11 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
else
|
||||
{
|
||||
int milliseconds = 0;
|
||||
int year = 0, month = 1, day = 1;
|
||||
/* Default to gregorian year one ... there is no year zero and
|
||||
* the algorithms we use look odd for earlier dates.
|
||||
*/
|
||||
int year = 1;
|
||||
int month = 1, day = 1;
|
||||
int hour = 0, min = 0, sec = 0;
|
||||
NSTimeZone *tz = nil;
|
||||
BOOL ampm = NO;
|
||||
|
@ -1274,7 +1278,10 @@ static inline int getDigits(const char *from, char *to, int limit)
|
|||
{
|
||||
_time_zone = RETAIN(aTimeZone);
|
||||
}
|
||||
_calendar_format = cformat;
|
||||
if (_calendar_format == nil)
|
||||
{
|
||||
_calendar_format = cformat;
|
||||
}
|
||||
_seconds_since_ref = s;
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue