#### 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 32955 articles. 7 followers. brian (1246) is leader.

1 Replies
332 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:

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) ...

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...

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 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...

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....

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...

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 ...

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...

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
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 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... 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 problem hello, first of all, i suppose i better say that i'm an absolute n00b with linux.. i'm using slackware 10 atm.. i want to get isdn going.. where do i start? i have two modems, one internel asuscom isdnlink, and another external dreytek one.. i dont mind which one i get going, so long as i get on 64k.. i downloaded and installed isdn4k-utils, but i dont have a clue how to use it.. just way to complicated for me.. are there any good graphical tools i can use to configure my modem(s)? or can anyone please point me to some good howto's or documemtation on isdn for linux (i did try goo... The Problems With Linux Here are the problems with Linux: o it is made by people (some of whom have beards) who openly call themselves hackers; o it involves stolen copyrighted code from a highly reputable company; o the priorly-assumed creator of it admitted this week that he didn't in fact create it, but was posing as front man for the real creators; o it is for geeks; o it is too hard for most people to understand; and o running programs in it takes too much effort: we want to double-click! Bye Suzie wrote: > Here are the problems with Linux: > > o it is made by people (some of whom have beard... 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...

Linux problem
I just installed the x86_64 version of maple 10 on my ubuntu linux desktop, but I can't figure out why xmaple won't run. Installing in the first place was a bit of a pain: I had to use the '-i console' parameter, and once it was installed, I had to chmod +x the executables and replace the maple10/jre.X86_64_LINUX/bin and maple10/jre.X86_64_LINUX/lib directories with links to my current java version's (1.5.0_06) directories. I had no problem activating, and plain old console 'maple' runs fine, but nothing happens when I try to run 'xmaple' or 'map...

Strange problem: no problem with Linux, when I boot windows 2K network is down...
Guys: This is very strange problem, looklike this problem is not going to leave me for months. I have a computer with Windows2K and Linux. I have Netgear 4-port Switch/Router (connected to DSL modem). If I boot with Linux, everything is OK, I can be on-line, also two of my other computers works fine. If I boot my PC with Win2K, then immediately all computers are down. None of the computer connected to network. I thought some problem with LAN card, so I went for early bird sale on day after Thanksgiving and I got one LinkSys PCI LAN card and one Router and I plugged new LAN card into my machin...

Problem with Linux
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Linux will spoil a whole weekend... So many free programs that are soooo good. Yesterday I pulled from the repository Marble and Stellarium. Sooooooooo distracting. So good. Be careful with Linux. With so many quality programs a click away it can totally ruin your whole weekend. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkqtd9oACgkQU4xAY3RXLo7nQACfajOb70Frmn7wKk4GaaVihB7Q oLYAoJ30RmbYu6OYHHt3/F5yJDHOsLX4 =0itY -----END PGP SIGNATURE----- On Sun, 13 Sep 2009 23:53:14 +0100, Roy Schestowitz wrote: > -...

The Problems with Linux
Linux....is well, interesting. I found the Live CD dist amazing for PC. It loaded fast and damn...I was surfing in a matter of minutes. Loaded no prob on both my AMD and P4 machines. The Alpha builds however... seem to be restricted to some who has a clue (obviously not me). An idiot proof version for all Platforms would be the nail-in-coffin for M\$. Cheers GM wrote: > Linux....is well, interesting. > > I found the Live CD dist amazing for PC. It loaded fast and damn...I was > surfing in a matter of minutes. > Loaded no prob on both my AMD and P4 ...

Problem with a problem
Hello, take a grammar G with alphabet {0,1} such that (the word problem for) the language L_G={w in (0+1)*|w\in L(G)} is very complex, say in PSPACE or some higher complexity class. Now consider an "easy" problem EASY like: "Is an element of L_G in L_G?". Well, this seems to be fairly easy because the answer is "yes" in any case. Hence the problem should be of small complexity. But if one models such a decision problem one has to construct a language L with alphabet A such that the word problem for L reflects exactly the decision problem which one is interested...

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...

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...

Problem with linux
hi, have newly loaded RedHat Linux 9 on my system along with Windows 2000 proffessonal. I have lots of doubts and queries regarding the OS and its usages. However initially i want to know y the system bcomes damn slow with linux? System Configeration: Memory is 64M and the Hard Disk partition space is 4 GB. P III processor. Can anybody pls tell me how can I improve the system and slowly migrate from windows to Linux for day to day usage? Adarsh -- Posted via http://dbforums.com adu143 wrote: > hi, > > have newly loaded RedH...