🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #191

Re: tijd converteren in C

#191
From: Johan van Selst
Date: Tue, 30 Oct 2012 08:44
26 lines
2480 bytes
Once upon a newsgroup, wimpunk claimed:
> Ik heb een klein testprogrammatje geschreven [1] dat een tijdsstring 
> volgens ISO 8601 omzet gebruik makend van strptime.  Vreemd genoeg krijg 
> ik het correcte resultaat onder os X terwijl ubuntu niet het correcte 
> (of toch het verwachte resultaat) oplevert.

Uit de strptime manual op een Ubuntu systeem:

  Glibc Notes
    For reasons of symmetry, glibc tries to support for strptime() the same
    format characters as for strftime(3).  (In most cases the corresponding
    fields are parsed, but no field in tm is changed.)

Ook %z wordt expliciet genoemd onder dit kopje. Een %z wordt dus wel
geparsed, maar heeft verder geen enkele invloed op de waarde die je
er uit krijgt. De opgegeven tijdzone wordt dus inderdaad genegeerd.

Wanneer een bug beschreven staat in de manual page, noemt men het een
feature.


Ciao,
Johan
-- 
Why do we always come here - I guess we'll never know.
It's like a kind of torture to have to watch the show.
Technical Details
Message-ID: <pgpmoose.201210300944.22217@mud.stack.nl>
Path: arc1-ca.pugleaf.net!q13ni105247wii.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!.POSTED!not-for-mail
References: <u3b3m9-bci.ln1@tisnix.motzarella.org>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,4b265506c665d809
X-Google-NewGroupId: yes
X-Google-Attributes: gid7e5f19c06,domainid0,public,usenet
X-Google-Language: DUTCH,ASCII-7-bit
Received: by 10.180.93.6 with SMTP id cq6mr162058wib.2.1351586688695;
        Tue, 30 Oct 2012 01:44:48 -0700 (PDT)
Path: arc1-ca.pugleaf.net!q13ni105247wii.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!.POSTED!not-for-mail
From: Johan van Selst <{b.c.p.}@news.gletsjer.org>
Newsgroups: be.comp.programming
Subject: Re: tijd converteren in C
Date: Tue, 30 Oct 2012 08:44:48 +0000 (UTC)
Organization: M.C.G.V. Stack
Lines: 26
Sender: johans@mud.stack.nl
Message-ID: <pgpmoose.201210300944.22217@mud.stack.nl>
References: <u3b3m9-bci.ln1@tisnix.motzarella.org>
Reply-To: Johan van Selst <{b.c.p.}@news.gletsjer.org>
NNTP-Posting-Host: mud.stack.nl
Mime-Version: 1.0
X-Trace: mud.stack.nl 1351586688 21819 131.155.141.70 (30 Oct 2012 08:44:48 GMT)
X-Complaints-To: abuse@stack.nl
NNTP-Posting-Date: Tue, 30 Oct 2012 08:44:48 +0000 (UTC)
User-Agent: slrn/0.9.9p1 (FreeBSD)
X-Auth: PGPMoose V1.1 PGP {b.c.p.}@news.gletsjer.org
 iKgEAAEIAAYFAlCPk4AACgkQ0vB2A6uR1iZ2WwRfaLaMIbgj5MbmJDZG+O2y8Kq+
 jl2hdCTbLK5qs0stCCc+q+AO5RnWRk9/9mWSGEWCz33I9nx0HKK7zGi+J2LyCoKS
 ktuWSYmu66+ccFJ/5cUE57eptvJH5Hj6P94XCsgpoKoKVIdya+XXnPikxEYbP7Ee
 nnBvbyAa2PfabJEzxQ8S4oe37cBInrS5EyY= =Iq8A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit