Sponsored Content
Full Discussion: PERL localtime Warning
Top Forums Shell Programming and Scripting PERL localtime Warning Post 302412650 by NIMISH AGARWAL on Tuesday 13th of April 2010 06:28:37 AM
Old 04-13-2010
Thank you very much for bright suggestions :-)
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl + localtime()

ok here is a perl date question not asked befor. i know i am feeling small for not knowing. BUT!!!! $ENV{TZ}="US/Central"; ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(); how can i do the addition to year so i can get the current year w/o going $ntime=$year+1900;... (3 Replies)
Discussion started by: Optimus_P
3 Replies

2. UNIX for Advanced & Expert Users

converting localtime to unixtime

hi, how to convert the localtime to unixtime? i have date from the date command in unix i want to convert it into unixtime thnx (2 Replies)
Discussion started by: AshishK
2 Replies

3. HP-UX

sleep & localtime query

Hi, I work on HPUX application and i had a query regarding the sleep & localtime system call in HPUX. Here is the code that we have : const uint32_t WAKE_INTERVAL_SEC(30*60); while (true) { // Find out what time it is time(&currentTime);... (3 Replies)
Discussion started by: nsvora
3 Replies

4. Shell Programming and Scripting

date with perl localtime

Hi Experts, I know how to handle normal date changes in perl. Most of my requirement are full filled with following: $date1 = strftime "%Y%m%d",localtime; $date2 = strftime "%Y%m%d",localtime(time -24 * 60 * 60); $date3 = strftime "%Y%m%d",localtime(time +24 * 60 * 60); $date4 = strftime... (4 Replies)
Discussion started by: mtomar
4 Replies

5. Shell Programming and Scripting

what is the default return type of localtime() in perl?

Hi, I have given like this to get the time of the sub routine. my $start = localtime(); print "\n start time: $start \n"; Output start time: Fri Apr 29 01:01:31 2011 I want to know what is the format of the time. I am not able to follow is is HH:MM:SS or MM:HH:SS os... (2 Replies)
Discussion started by: vanitham
2 Replies

6. Shell Programming and Scripting

Pack and unpack localtime in perl script

Hi I have a code like this: sub WriteEbcdicHeader { my $Htimestamp=localtime();#i need to pack and unpack this my $eheaderline = $Htimestamp; #packing has to be done here #unpacking has to be done after packing print $EOUTFILE return $eheaderline; } sub WriteEbcdicTrailer { ... (5 Replies)
Discussion started by: rbathena
5 Replies

7. Shell Programming and Scripting

Perl help LocalTime in New Format

Hi, I'm new to perl scripting and am trying it out. I have a file written in the following format: myfile-MMDDYY where MM is the number of the Month; DD the Day and YY the last two of the year... (Apologies for dumbing this down; I'm trying to be clear). There is a new file put onto my... (2 Replies)
Discussion started by: Astrocloud
2 Replies

8. Shell Programming and Scripting

How to use a variable in perl localtime()?

Hi all, a=$1 ## b=`echo "86400 * $a"|bc` `perl -e 'use POSIX qw(strftime);$now_string = strftime "%d/%m/%Y", localtime(time-$b); print $now_string,"\n";' > date_file` but im always getting current date; can any one suggest me any the improvement the above works fine if i use some thing... (2 Replies)
Discussion started by: zozoo
2 Replies

9. Programming

TZ, localtime and strftime problem on AIX and Solaris

Hello all, I have the following code that seems to be misbehaving depending on the timezone setting (TZ Environment variable). It gives the correct value when TZ is in POSIX format and the wrong value when in OLSON format. #include <stdio.h> #include <stdlib.h> #include <time.h> #include... (6 Replies)
Discussion started by: biju64
6 Replies

10. AIX

Perl error : perl: warning: Setting locale failed.

This's my problem perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LC_ALL = "en_US.UTF-8", LC__FASTMSG = "true", LC_MESSAGES = "", LC_CTYPE = "en_US.UTF-8", LC_TYPE = "en_US.UTF-8", LANG = "EN_US"... (1 Reply)
Discussion started by: bobochacha29
1 Replies
restorepalette(1)						Svgalib User Manual						 restorepalette(1)

NAME
restorepalette - set the color palette for textmode. SYNOPSIS
restorepalette [filename] DESCRIPTION
restorepalette without arguments sets the standard VGA palette. This can be useful if it is somehow messed up. With a filename argument a custom palette can be loaded (feature added by Charles Blake <chuckb@alice.wonderland.caltech.edu>). This allow a user to set up a file that looks like this one (These color map definitions are the same as the default VGA ones. Alter to suite personal tastes). The first column contains the number of the color to set, then follow three integers in range 0 - 63 (lowest to highest intensity) for red, green, blue. 0 0 0 0 # black 1 0 0 42 # blue 2 0 42 0 # green 3 0 42 42 # cyan 4 42 0 0 # red 5 42 0 42 # magenta 6 42 21 0 # brown 7 42 42 42 # white 8 21 21 21 # bright black 9 21 21 63 # bright blue 10 21 63 21 # bright green 11 21 63 63 # bright cyan 12 63 21 21 # bright red 13 63 21 63 # bright magenta 14 63 63 21 # bright brown 15 63 63 63 # bright white The inline comments are the only kind of allowed, as I use a little fscanf(3) trick to get them. Blank lines are ok, but not pure comment lines. See the comments in my code, also. This allows people to set up custom palettes for use in virtual console text modes. I use it all the time. When combined with a color-syn- tax editor like jed-0.97+ or color-ls, etc., being able to choose your own text-mode palette is quite a bonus. I set mine up via restorepalette /etc/palette in my /etc/rc. If the program is given the correct permissions, then individual users can have restorepalette ~/.palette or some such thing in their shell startup files. Of course, it shouldn't be done when starting remote shells or when under X, so some kind of test that TERM is a virtual console is needed for that case. SEE ALSO
svgalib(7), vgagl(7), libvga.config(5), vga_setpalvec(3), dumpreg(1), convfont(1), fix132x43(1), restorefont(1), restoretextmode(1), runx(1), savetextmode(1), setmclk(1), textmode(1). AUTHOR
This manual page was edited by Michael Weller <eowmob@exp-math.uni-essen.de>. The exact source of the referenced utility as well as of the original documentation is unknown. It is very likely that both are at least to some extent are due to Harm Hanemaayer <H.Hanemaayer@inter.nl.net>. Occasionally this might be wrong. I hereby asked to be excused by the original author and will happily accept any additions or corrections to this first version of the svgalib manual. Svgalib (>;= 1.2.11) 2 Aug 1997 restorepalette(1)
All times are GMT -4. The time now is 12:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy