Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: localtime() for win32 problem.


  • From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
  • To: 'Korea PostgreSQL Users' Group' <pgsql-kr(at)postgresql(dot)or(dot)kr>, pgsql-hackers-win32(at)postgresql(dot)org
  • Subject: Re: localtime() for win32 problem.
  • Date: Thu, 29 Jul 2004 15:11:17 +1000
  • Message-id: <A02DEC4D1073D611BAE8525405FCCE2B55F52C(at)harris(dot)memetrics(dot)local>

Hmm. Looks like we are trying to "score" timezones using date/times pre
midnight, Jan 1 1970, which is a no-no for win32 (IIRC, this was a prime
motivator for rolling in a pg_timezone library).

Have to avoid this, or change pgtz.c following lines 184 and 304 to
correctly deal with a NULL return from the native localtime.

Cheers,
Claudio




> -----Original Message-----
> From: Korea PostgreSQL Users' Group [mailto:pgsql-kr(at)postgresql(dot)or(dot)kr]
> Sent: Thursday, 29 July 2004 2:06 PM
> To: pgsql-hackers-win32(at)postgresql(dot)org
> Subject: [pgsql-hackers-win32] localtime() for win32 problem.
> 
> 
> I found that localtime do not work same between linux and win32.
> 
> timet = -1000000; /* minus value */
> localtime(&timet);
> 
> above codes do not work win32. (in Microsoft C, mingw gcc too)
> 
> so, score_timezone() function in src/timezone/pgtz.c should 
> be changed. 
> this problem is continuous with initdb when initdb run 
> without setting TZ env value.
> ---------------------------(end of 
> broadcast)---------------------------
> TIP 7: don't forget to increase your free space map settings
> 

--- 
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see 
<a
href="http://www.memetrics.com/emailpolicy.html";>http://www.memetrics.com/em
ailpolicy.html</a>



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group