POSIX::mktime problem on linux.

  • Permalink
  • submit to reddit
  • Email
  • Follow


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
Reply forvaidya (2) 5/24/2006 9:15:55 AM

See related articles to this posting


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
Reply Daniel 5/24/2006 10:10:40 AM
comp.lang.perl.misc 32806 articles. 7 followers. Post

1 Replies
279 Views

Similar Articles

[PageSpeed] 44


  • Permalink
  • submit to reddit
  • Email
  • Follow


Reply:

Similar Artilces:

Linux, ISE 7.1, problems, problems, problems ....
ok, ok we've beaten this subject to death already .... I just had this really radical and crazy idea: XILINX, how about a BETA program ? I mean one before you burn the CDs and make a product announcement and we are stuck with a useless plastic disc. If I look at all the issues that people are having with 7.1, they are all so trivial and easy to to solve (include a few libs, distribute a statically linked setup program, etc.). I'm sure a few of us with subscription would volunteer to test drive a pre-release version of your s/w. - I know I would. Wouldn't that be much nicer t...

Linux, Linux, Linux
Hi, Interested in trying Linux? Well you came to comp.os.linux.advocacy for some reason, and you probably won't stay long. Here's a list of Linux distributions to choose from. Ubuntu http://www.ubuntu.com Newbie friendly and good support forums. SuSE http://www.novell.com/linux Pay for some support if you're not opposed to spending a little money. Fedora Core http://fedoraproject.org If you're more comfortable with your computer, try this one out. If you get frustrated, don't give up so easy. There is a wealth of information online for whichever distro you choose....

Linux to Linux Fileshare Problem
I have two old desktops both running Ubuntu Linux, I also have an XP laptop all working behind a draytek 2600 router. Samba is set up on both Linux machines, my XP machine can access both Linux machines and both Linux machines can access the XP laptop. Problem is neither Linux machine can view the other's files. If from either Linux machine I connect to the network it shows the other Linux machine, clicking on the networked Linux machine it then lists the shared directories but if I click on the directories a window opens requesting a username, domain and password. The username sh...

problems problems problems
(The short(?) summary) I've got an Access MDB file and a DAO connect with it.. Problem 1 of 2 The below gives me a runtime error 91 Object variable or With block variable not set. I've got the db stuff after the form.show (to make sure all the objects on the form are loaded before attempting to utilize/manipulate them) But it doesn't like it when I use the data object in the form load anyway for some reason.. pffft. Private Sub Form_Load() frmTest1Project.Show datGallery.Recordset.MoveLast datGallery.Recordset.MoveFirst Call LockTextBoxes(frmTest...

NSA, Linux posixers, how Linux is a failure
Comment on Cybersecurity, open OSen, and Stuxnet, to the NSA Hello NSA. I'm the first person ever banned from linux-kernel. I was banned for spewing hackish off-topic stuff like a working stack machine interpreter daemon, "Why the Plan 9 C compiler doesn't have asm("")", and a packages-friendly internationalization of the file names tree. Appended below is a trivial shell function that gets rid of make. The worst threat to US cybersecurity is the plague of machines running MSDoS+GUI on internetworked machines. Stuxnet, of course, attacks Mickeysoft. That was buri...

Linux Router/Firewall
I have been running a Linux Firewall/Router (192.168.1.1) for my WinXP computer for a while now and decided to change the client(192.168.1.4) to linux as well (mandrake). The strange thing is that I'm not able to connect Linux->Linux now. I get no ping reply from ether client to router or the other way around. Tcpdump shows some arp traffic though. Both computers can ping their own ip and loopback without problems. Any pointers? Fry wrote: > Linux->Linux now. I get no ping reply from ether client to router or the > other way around. Tcpdump shows some arp traffic though. ...

Linux: tons of problems XP: one problem
"My friend is a linux lover...Linux gives him tons of problems (he uses PCLOS) and he always talks about how good it feels to fix problems in Linux, yet when his XP install gives him ONE PROBLEM after three years he starts talking shit about microsoft." #9 at http://www.dvorak.org/blog/?p=14453 A perfect description of many of the luser hypocrites that populate the Linux world. Micoshaft fraudster DFS wrote on behalf of half wits from Micoshaft Corporation: > when his XP install gives him ONE PROBLEM after three years he > starts talking shit about microsoft." #9...

Not able instal linux(problem in partioning the Linux)
i have Windows xp in my system, i am using 80gb hard disk. in that i have used 70 GB for windows Xp and i left 10 GB free for Linux.... i want to install Red hat linux 9.0. I can boot the red hat linux for the installation but when i go to the step of partitioning for linux. i can make only two partitions like /, and /boot.. or swap and /, or any two combinations if i go for the... more =BB by kirankumar.277@gmail.com - 11:53am - 1 new of 1 message ...

Problem backing up files on linux machine ( linux newbie )
I have a problem backing up files on my Linux machine. I have tried using tar and cpio but the file exceeds the 32 bit file size limit of 2 GB. Ideally I would like a backup that was a replication of the file system so I could access the files individually not in an archive I also want to exclude the filesystem I am writing the backup too for obvious reasons. Can anyone help pls. Don Try using the tar command as a pipe with an exclude file. This example will backup the machine from the / mountpoint recursively excluding the filesystem mounted on /mnt where the backup will be held. # Creat...

Linux problems
So, last night, I'm surfing the Web on my home Mint machine, and, without warning, a kind and generous Web site gave my machine a free virus scan! And thank goodness - look at all the badness that was found!! http://i54.tinypic.com/2w6waz6.png I thought this result a bit odd, since Mint has no C: drive, but I trusted that "Windows Web Security" was ready to remove all the nasty viruses and trojans, so I downloaded the program, softupdate107_2263.exe. But the program will not run! What am I to do now?!?! How do I get these nasties off my Linux machine for good? Ma...

Major Linux Problems The 2012 Edition. Why Linux is not ready for the desktop.
Great reading which exposes the seamy underbelly of Linux. BTW for a wonderful example of the childish, cult like Linux community attempting to defend Linux, read the comments. Is this like the 5th grade or something? No, it's your Linux community hard at work. The very same people you will go to for help with Linux when it tanks on you, and it will. Enjoy! http://linuxfonts.narod.ru/why.linux.is.not.ready.for.the.desktop.current.html Torre Starnes wrote: > Great reading which exposes the seamy underbelly of Linux. and the true nature of online trolls trying it on ...

Linux problem
I have DELL E560 computer i want to install linux any linux (Red hat Linux,SUSE) but when i boot the machine with Linux CD it's boot but after select language and keyboard it promting for cd rom and showed following error, Could not find the SUSE linux installation CD Activating manual setup program if select ok it's showed following error you can leave linuxrc only via "start installation or system" you may need to load some drivers (modules) to support your hardware Can i have solution on this problem jpednekar26@gmail.com wrote: > I have DELL E560 computer i want...

Linux!! Linux!!
From http://groups.google.ca/group/comp.os.linux.misc/about This month 16 t...@invalid.invalid 15 ahlstr...@launchmodem.com 14 goldee_loxnbag...@gmail.com 10 jhas...@newsguy.com 9 mil...@yoyo.org 9 hel...@deepsoft.com 9 hadronqu...@gmail.com 8 ronb02nos...@gmail.com 7 secret...@lxny.org 7 ignoramus8...@nospam.8345.invalid All time 5421 p...@oboe.it.uc3m.es 4508 michael+use...@www.heiming.de 3530 j...@dhh.gt.org 3066 hel...@deepsoft.com 2991 nike_jordan_...@yahoo.com.cn 2651 jdbe...@exit109.com 2474 gra...@visi.com 2216 nikejordangoo...@hotmail.com 1890 rkiesl...@mainmatte...

I have Linux! I have Linux!
Ok, after two days of trying to get Windos 1900 installed and working , I sat down an hour ago and installed Linux. In an hour. Smirk. Ok, I will be honest. I did have some problems, but I believe they were of my own ignorance. 0) I started with trying to install Suse. However, I couldn't get it to install. Why? Because I didn't read the menu. There is a startup menu and the first entry is boot to harddisk. I thought that was the thing to do so I did it about 4 times. Then I gave up. However, I went back to it and subsequently realized that I should have chosen the 2nd men...

My Linux is not your Linux
To the denizens of comp.os.linux.advocacy! So many people demonstrate in this newsgroup that they know only a Linux of Hatred and Greed, of paranoia, and of a selfish sense of entitlement. They seem always to be behaving like monkeys in reaction to human dissenters, throwing feces at one another and beating their chests pretending to know something. My Linux is not that Linux. My Linux is the Linux of Love, of sharing, friendship, community. It is a uniquely human Linux and not one for monkeys. When I speak with fellow Linux users in real life (i.e. not in the monkeyhouse of COLA) they remin...

The problem with Linux
It's funny how anti-Linux voices are typically accused of being paid M$ trolls in Cola. I dislike Linux and I can assure you I'm not being paid to say so. I'll tell you why I dislike Linux -- because it disappoints me. It's hyped to be a credible alternative to Mac or Windows but when you actually install it, you learn the hard way that Linux just doesn't cut it. It takes two minutes to boot. Why? Windows XP takes 20 seconds. The Windows desktop is fast and responsive. By contrast, Linux desktops are annoyingly sluggish -- not just KDE or Gnome, but even the 'li...

Problems with mktime
I'm trying to write a program that will show the time at various different places. The idea is to get the GMT time, adjust it for the correct time zone offset (including DST if appropriate) and display it. My first attempt (limited to BST) would use gmtime to get GMT, add 1 to the tm_hour member, knock off 24 if the adjusted hour exceeded 23, and show it. This worked OK. However, I discovered the function mktime which I though might provide a more general solution. As I understand it, if you pass it a struct in which the number of the hour is outside the proper range, it will adjust things...

Linux Problems
I want to find out whether a user is logged into my computer through > the RS232 serial port. > For FC6 (kernel 2.6.18-1.2798), the environment variable > TERM will be set to "linux" for serial port login. > Isn't it? > For all types of log in, then TERM will be set to something else, > right? At runlevel 3, do Alt-Ctrl-F1, log in, and do "echo $TERM". On my system, that produces "linux". Cesar Onofre Kawase kws8207 schrieb: > > I want to find out whether a user is logged into my computer through > the RS232 serial port. > For ...

Problems problems....
I've got Fujitsu MAN3184MP and Adaptec 29160 scsi card. Sometimes i have this message "A disk read error occured" , sometimes even bios does not recognize it, sometimes it does but the boot sequence does not start it seems that motherboard bios has problems with it ( so it seems to me, i could be wrong about that assumption) . Then i reset and it all works perfectly. I've noticed a speed degradation in Win XP lately. I'm angry :)) I have LVD/SE terminator, and i think 68pin cable ( not sure about that ). Hope i gave you enough info to try and help. Thanx! -- -...

a few linux problems
thanks everyone for replying to my previous post. well, this is what i did. like a smartass, i installed debian linux over my windows installation... n then i realise that the distribution doesn't come with drivers(sound, etc.), or maybe i just couldnt figure out how to 'do' the drivers. well, so i install windows again leaving free space on the hd, n then install mandrake community linux 10.0. this did detect the sound card during the installation, and did something else about the graphics. problem is... it still cant do a thing about videos... not the normal ..dat files, not t...

Linux lusers deny the reality of Linux bugs and security problems
The article is old, but the petulant Linux lying cultist behavior is as prevalent as ever. http://www.informationweek.com/news/windows/showArticle.jhtml?articleID=6500344 On Tue, 3 Jun 2008 10:57:10 -0400, DFS wrote: > The article is old, but the petulant Linux lying cultist behavior is as > prevalent as ever. > > http://www.informationweek.com/news/windows/showArticle.jhtml?articleID=6500344 Things in the world of Linux never change. Take Linux's desktop market share for example. Still sitting at 0.6 percent even after 16 years! The Linux cultists will always LIE for...

The problem with Linux.....
Linux just runs. It stays running for a long time. You start a machine and a year later you have to move it or something. Then you have to remember what you did a year ago. __/ [ mlw ] on Friday 11 August 2006 14:56 \__ > Linux just runs. It stays running for a long time. You start a machine and > a year later you have to move it or something. Then you have to remember > what you did a year ago. I sometimes forget what the bootloader looks like. I sometimes what the login manager looks like. I rarely save work/messages as I go along because, quite frankly, rarely will anything go...

Linux problems...
What am I doing wrong? I see all these linux problems out there, but I am having trouble getting my own problems. 64 bit machines are supposed to be a problem, and yet this one has run a 64 bit OS since late 2005. 64 bit is also supposed to be slower, but the linux OS here shaves 23% of video compression times. Ipods are not supposed to work, and yet I plug them in here and amarok recognizes it straight away and lets me transfer music. Bummer. TV cards aren't supposed to work, and yet I buy a card and put it in, and I get a tv player pop up on the desktop. I can record video AV in s...