#### POSIX::mktime problem on linux.

mktime is broken on linux. POSIX::mktime doesn;t honor dst (daylight
saving flag) on linux. Works on solaris

Solaris version = SunOS water 5.9 Generic_112233-12 sun4u sparc
SUNW,Sun-Fire-V440
Linux version = Linux snow 2.4.21-15.ELsmp #1 SMP Thu Apr 22 00:18:24
EDT 2004 i686 i686 i386 GNU/Linux

#!/bin/perl
use POSIX;
print POSIX::mktime(0, 1, 1, 12, 12, 99,  0,  0,  0) , "\n" || die
"$!"; print POSIX::mktime(0, 1, 1, 12, 12, 99, 0, 0, 1) , "\n"|| die "$!";

Gives output on linux = (BAD).
947619060
947619060

Gives Output on solaris (looks good)
947619060
947615460
mvaidya@water:/home/mvaidya/TO_REMOVE>bc
947619060 - 947615460
3600


 0
forvaidya (2)
5/24/2006 9:15:55 AM
comp.lang.perl.misc 33123 articles. 1 followers. brian (1246) is leader.

1 Replies
405 Views

Similar Articles

[PageSpeed] 48
forvaidya!

> mktime is broken on linux. POSIX::mktime doesn;t honor dst (daylight
> saving flag) on linux. Works on solaris

No difference for me between

Linux chloris 2.6.16.9-diskless #1 SMP PREEMPT Fri Apr 21 15:51:49 CEST
2006 i686 GNU/Linux

and

SunOS mizar 5.10 Generic_118822-02 sun4u sparc SUNW,Sun-Blade-1000

However, this is not perl's fault anyway. POSIX::mktime calls the
underlying OS equivalent of mktime(). The behaviour of Linux mktime has
changed multiple times.

Daniel


 0
Daniel
5/24/2006 10:10:40 AM
Similar artilces about - POSIX::mktime problem on linux.:

News server problem (ProNews related)
Hi, It seems everytime I post a message to my news server, ProNews/2 goes off-line. I'm wondering if there is a setting that can prevent it from doing so? -- Luc. Come to Warpstock 2003! - <www.warpstock.org> On Wed, 23 Jul 2003 08:31:48 UTC, "Luc Van Bogaert" <luc.van.bogaert@netsky.be> wrote: > It seems everytime I post a message to my news server, ProNews/2 goes > off-line. I'm wondering if there is a setting that can prevent it from > doing so? Open the Settings notebook from the Control Panel. Select your news server from t...

[ace-users] RE: [tao-users] Problems compiling ACE on an Alpha machine :-(
Hi, Thanks for using the PRF form > ACE VERSION: 5.5 > > HOST MACHINE and OPERATING SYSTEM: > > OSF1 wks37 V4.0 1229 alpha alpha > > TARGET MACHINE and OPERATING SYSTEM, if different from HOST: > COMPILER NAME AND VERSION (AND PATCHLEVEL): > > wks37> g++ -dumpversion > 3.2.3 > > THE $ACE_ROOT/ace/config.h FILE > > wks37> tail$ACE_ROOT/ace/config.h > #include "ace/config-true64.h" Be aware that we haven't build for tru64 for more then a year. It is also one o...

Posix Thread : C++ : poiinter to Member function
Hello All... I am using Posix Thread. class Parent { public: virtual void* func(void *)=0; }; class Child : public { void *func(void *); }; void* Child :: func(void *) { //pring Msg} int GlobalFunc(Parent * p) { void* (Parent::*func)= p->func;//p May Point to Child Object....!!! pthread_t thread1; pthread_create(&thread1,NULL,.......,NULL);// Here I want to Call func of Any Derived Class of Parent pthread_exit(0); } int main() { Child ch1; GlobalFunc(&ch1); return 1; } My Problem is at pthread_create...... in pthread_create i am Able to Call any Publi...

I have a PROBLEM
When I run my simulation: I get this error message: theer might be a singularity in the solution. Try reducing the step size or tightening the error tolerance. or another error message: solver step size is becoming less than specified minimum step size is there any trick to do to solve this? Use some other solver like ode23tb if ur time is much more. Use some other solver like ode23tb if ur time is much more. ...

MS Access sum problem in query
I have 2 queries, for the sake of this post I will refer to them as query1 and query2. Basically query1 returns a number of results from tables which are grouped and then query2 queries query1 and is expected to sum the number of hours. query1 returns the following rows: PersonID StartDate EndDate Hours =========================================== 801 07/09/06 11/12/06 420 801 05/09/06 11/12/06 429 801 13/12/06 04/04/07 651 query2 comprises of the following query: SELECT [query1].[Perso...

[News] [Linux] IDC Spread the Linux FUD Again
Dell Won't Preinstall Ubuntu Linux On Small-Business Computers ,----[ Quote ] | Dell's refusal to sell Ubuntu machines to small businesses makes sense, | because those customers typically want PCs that let them get to work right | away. "It makes sense because the assumption is they want everything to work | right out of the box," Richard Shim, analyst for IDC, said. "With something | like Ubuntu, it's going to require some tinkering." ---- http://www.informationweek.com/news/showArticle.jhtml?articleID=200000030 IDC tells the world that Windows invo...

problem with grep
>From a set of files of extension c ,i need to find a pattern string and the output must also contain the filename of the file tht contains the match. i did $cat find . -name '*.c'|grep -H mystring but its giving the location as standard input. I need the name of the C file. jeniffer wrote: > >From a set of files of extension c ,i need to find a pattern string and > the output must also contain the filename of the file tht contains the > match. > i did >$ cat find . -name '*.c'|grep -H mystring > but its giving the location as standard input. &g...

File ownership "memory" problem
Hello On one of my Debian Sarge machines, the .ICEauthority file for a particular user has a "memory" problem as far as ownership goes. When I set up this machine a few months ago, logged in as root, I su'ed to that user and ran a few kde programs (which presumably created this .ICEauthority file with root ownership). Now, every few days (and this is erratic - it can be every 2 logins or it can be every 10 logins), when I login as that user, I get a fatal error complaining that that user does not have write permissions to .ICEauthority. I then have to get back to kdm, switch ...

US-TX-Austin,TX.: Storage/server test tech, W2K/Netware,Linux,RAID,OS; 9M (45352957608)
US-TX-Austin,TX.: Storage/server test tech, W2K/Netware,Linux,RAID,OS; 9M (45352957608) ======================================================================================= Position: Storage/server test tech Reference: ZYD00044 Location: Austin TX Duration: 9M Skills: Experience in server, storage, and network technologies. Experience with installation/configuration of server OSs such as W2K/W2K3/Netware/ Linux, RAID, and basic understanding of server hardware are required. OS expertise required. ...

POSIX standard
Where can I get a copy of the POSIX standard that MINIX 2.0.0 conforms to? Thanks. Chungfung Hu en vanhu <loveminix@yahoo.com.cn> wrote: > Where can I get a copy of the POSIX standard that MINIX 2.0.0 conforms to? Hard copy is available from the IEEE in New York. It's expensive. When we started working on the OSDI 2nd edition book I got Prentice-Hall to buy a copy for me. You can get information on purchasing IEEE documents on-line at http://standards.ieee.org/. Even paying to have a PDF document e-mailed to you is quite expensive. You might d...

RefTeX cite problem
Hi I use Emacs with AucTeX and RefTeX and I have a little problem to include a \cite macro. By pressing "C-c [" I enter the regexp and a list of all matching bib entries is shown. If I select one with RET nothing happens and the minibuffer shows: "reftex-citation: Symbol's value as variable is void: reftex-cite-prompt-optional-args". Yesterday everything worked fine. Any ideas where to look and what to do? Thanks a lot! Mathias On 2009-04-21 23:17 +0100, Mathias Lindner wrote: > Hi > > I use Emacs with AucTeX and RefTeX and I have a little problem to >...

Cups problem
I am trying to configure a Brother hl-1440, on LBA Linux. At first problem was that I was not getting any output from the printer usinf foomatic driver, if I send a raw job it was printing, I have tried to reinstall cups and it did not work, then I used one of the CD bootable versions of linux to see if I have problem with cups and had same story, them I updated system bios and cd boot version prints fine, but my LBA linux still is not printing and gives me "Unable to create temporary printer" error when trying to create one. I have looked at the permissions on /var/spool/cup...

Fugu SFTP Mac=>UNIX line endings problem
Don't know where else to ask this, so... I'm trying to upload plain text files from my eMac (OS X) to a UNIX server. The text file will be read by a PHP code for inclusion on a web page. I can do this fine with and old Fetch program (running in Classic), but can't get Fugu to interpret/change the line endings properly. (PHP is reading the file into an array, so the line endings are critical.) Fetch explicitly says it's transferring in "Text" mode, whereas I can't find any binary/text settings in Fugu. I assume people do this sort of thing all the time. How do yo...

GNU/Linux Market Share at 35%?
That's what boycottnovell.com says (2007-2008): | Month Linux market share (NOT including "N/A"/"Unknown"/ | "Other"/agent spoofing/proxies) | | Jan 2007 33.2 % | Feb 2007 32.8 % | Mar 2007 33.7 % | Apr 2007 33 % | May 2007 31.1 % | Jun 2007 36.5 % | Jul 2007 30.9 % | Aug 2007 36.4 % | Sep 2007 36.6 % | Oct 2007 36.8 % | Nov 2007 38.1 % | Dec 2007 31.1% | Jan 2088 30.3 % | Feb 2008 35.6 % Hmmmm... maybe all those Web 'surveys' are simply looking at the wrong ...

eqnarray* problem (bug?)
help! i've been struggling with this anomaly for hours now and i'm about to lose my mind... i'm having trouble with an eqnarray*... basically, i've included below a minimal latex file that will reproduce the problem. the first eqnarray produces an equation spread over two lines that is for some reason pushed to the right of the page. the second eqnarray produces a correct two line equation that is in the right location on the page. i'm inclined to think this is a bug, because the first equation is so far right it extends into the margin, yet no overfull \hbox is report...

debugger problem
I am trying to convert an clipper app to VO 2.7b. I am using the debugger to see what is going on. The debugger appears to work until the shell window and menu appears on screen. After this I can not see any more code. I have checked the properties box in each module. Any suggestions or is this a problem with debug. Malcolm Hi Malcolm, whenever you want the debugger to pop up, you'll have to code AltD() there in your Code where you want to have a look. It's not done as in the old days by pressing "Alt+D" (-8 HAND Klaus "me" <lus...

I wonder if anyone can help me. I have just set up a new virgin vms v7.3-1 and have completed set up and installation of Oracle. I now want to set up the vol shadowing on the system drive DKB0: I updated the MODSPARMS.DAT to include SHADOWING = 2 SHADOW_SYS_DISK = 1 SHADOW_SYS_UNIT = 0 SHADOW_MAX_COPY = 1 On the reboot the following message appears: SYSINT-E- error creating shadowed system disk, status = 007282AC Can anyone shed some light - the HP manuals are no help. Thank you, Alec "Mebos" <mebos@casitron.com> writes: > On the reboot the followin...

Relationship problem #2
Hi, I have a table People and a table Adresses where People::ID is related to Adresses::PeopleID. I can import a list of IDs into People::ID and the corresponding adresses are displayed. That's what I want. The People list is "acting as a filter on Adresses". That's fine. Now I also have what I call a "global filter field" in People which I want to link to the City field of Adresses. I want to be able to type in a list of Cities so that the adresses that are displaying because of the People::ID will be refined, based on the contents of the Cities field. I c...

Strange problem
Hi, I am having a strange problem in my Maple code. I create a list like this: l := []; for i from 1 to 10 do l := [op(l), i]; od; and it outputs [0, 10] more specifically l grows like [] ->[0, 1] -> [0, 2] -> ...->[0, 10] did anybody else have the same problem ever (If so what's the possible reason)? thx Ajay In article <1133235321.738511.318170@g47g2000cwa.googlegroups.com>, aj <mailsity1@mailcity.com> wrote: >Hi, > I am having a strange problem in my Maple code. > >I create a list like this: > >l := []; ...

Problem with focus
I have two JButtons b1 and b2 on JPanel. Initially, b1 is enabled and b2 is disabled. When the user clicks on b1 the following code is executed: b1.setEnabled(false); b2.setEnabled(true); b2.requestFocusInWindow(); But b2 don't receive the focus. It seems that b1 is still focus owner. Neighter of them now receives keyboard input. Maybe parent JPanel lost focus? Where is the problem? > b1.setEnabled(false); > b2.setEnabled(true); > b2.requestFocusInWindow(); > I don't know JButton.requestFocusInWindow(); > Where is the problem? may be in your code -- Andre...

Matrix with text problem
I have a column of data and a matrix with numerical and text data as shown below data1 = 1 AB Z1 1 BC X2 1 CD Y3 2 DD X 4 2 DE X5 2 FG Z6 3 HI Z6 3 JJ Y7 3 KL X8 4 MN Z9 4 NO Z9 5 OP X10 5 PP X11 5 QR X12 6 RS Y12 6 ST Z12 7 TT Z13 7 TU Y13 7 VX X14 8 XY Z15 8 ZZ Z16 data2 = 1 3 5 6 8 I need to use data2 to take only the information from data1 that I need the column of numbers from data2 corresponds to the numbers in data2 on the first column that I need. I have a program that does this with numerical data but not for mixed numerical and text data. Here is what the result should look...

Security problems when hosting an SQL DB on a fixed IP SBS 2000 Server
Hi Guys I develop an accounting package that uses SQL/MSDE 2000 as the RDBMS. Its really hard for me to get new clients to look at my product when they have to download a minimum of 25MB (ie, MSDE installer) just to have a look at it. Now that I've got a fixed IP ADSL connection, I wanted to host a demo SQL db so that users can simply log in with my program (only 3MB tops) and see it. My problem is all the horror stories about how easy SQL Server is to hack and become a gateway to my network. My network's protected by a Zoom X4 Firewall NAT box, but I'll need to port map a 143...

[News] IBM Spreads Linux and OSS
IBM, strongest proponents of open source policy ,----[ Quote ] | In Indonesia, she said, IBM has been actively working with Open Source | and Linux community to nurture and help it thrive. In fact, IBM has | been a strong supporter of "Indonesia Go Open Source" since it was | launched in 2004. | | [...] | | In Indonesia, she said, IBM has been actively working with Open Source | and Linux community to nurture and help it thrive. In fact, IBM has | been a strong supporter of "Indonesia Go Open Source" since it was | launched in 2004. | | IBM has more than 7,000 skilled L...

Newbie SAS Array problem (take 3)
{My apologies if this thread appears more than once... I originally attempted posting it at approximately 5:00 pm and before midnight yesterday, but it has yet to appear and I am thus making another attempt...} Hi SAS-L'ers... I have a confession to make... I have been avoiding using Arrays for years and today is the day when I have put my foot down and have tried to face my fears and learn how to use them for once and for all. I have a clinical dataset with 25 diagnosis codes (A primary diagnosis and 24 potential secondary diagnosis variables). For each of these 25 diagnosis codes I w...