10-21-2002
Look at the man pages for date (man date)
Or
Not 100% certain but you will need to get to the OK prompt.
From there run the printenv command and this might help with your date format question.
10 More Discussions You Might Find Interesting
1. Programming
Hi,
In the sample program, I am trying to print a Japanese string.
The code is as follows:
main()
{
setlocale(LC_ALL,"");
printf("String is %S\n", L"JAP");
// Note "JAP" is a valid japanese string
}
If locale is C, the string gets printed, but if it a valid japanese locale, it... (1 Reply)
Discussion started by: Dippan
1 Replies
2. Solaris
Hi,
I need to locate the Solaris package that installs the en_GB.UTF-8 package in /usr/lib/locale.
Can anyone tell me which package it is?
I have installed all the locale related packages i can see from the Solrais 8 media but none contain the required locale.
My problem is that i can... (1 Reply)
Discussion started by: kitzel
1 Replies
3. Solaris
Hi all,
We've upgraded/migrated our production server from Sol 9 on a Sun V480 to Sol 10 on a V490 server.
How do I set/change the following values on Solaris 10:
Solaris 9:
$> locale
LANG=
LC_CTYPE=en_US.ISO8859-1
LC_NUMERIC=en_US.ISO8859-1
LC_TIME=en_US.ISO8859-1... (2 Replies)
Discussion started by: dewets
2 Replies
4. Red Hat
Hi,
I am writing a shell script which would ask user to select a locale and should set the locale for them.
In the script I am doing
export LANG=<user selected locale>
and i do 'locale' it would show me the changed locale.
But, when I come out of the program and do 'locale' it... (3 Replies)
Discussion started by: eamani_sun
3 Replies
5. Solaris
Hi gentlemen.
I would change LANG=C to iso_8859_5.
I have tried some variante, but it doesn't work.
Thanks. (24 Replies)
Discussion started by: wolfgang
24 Replies
6. Solaris
Hi,
I want to install en_US.UTF-8 locale on a solaris 9 system, can anyone please tell me how? (command and which CD to use)
---------- Post updated at 09:47 AM ---------- Previous update was at 08:56 AM ----------
Got it,..
3. How do I add a locale after installing the Base Product? (3 Replies)
Discussion started by: Mack1982
3 Replies
7. Solaris
hi,
I am using SOLARIS sparc 64 bit, during installation of Oracle i receive an error required OS locale en_US.UTF-8 does not exist on the installation computer. To avoid this issue, please ensure that the locale en_US.UTF-8 exists on the installation computer prior to installing Oracle.
when... (4 Replies)
Discussion started by: zeeshan047
4 Replies
8. Solaris
Pls help me to set the japanese locale in Solaris 10. I have checked JP locale has been already installed on Solaris BOX.
Thanks,
Karan N (2 Replies)
Discussion started by: nirka01
2 Replies
9. AIX
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
10. Solaris
Different in Solaris 10 in that you don't just edit TIMEZONE file. LANG is currently set to en_US.UTF-8 and want it to be C.
Heres what I did:-
# svccfg -s svc:/system/environment:init setprop environment/LANG = astring: C
# svcadm refresh svc:/system/environment
And afterwards these are... (7 Replies)
Discussion started by: psychocandy
7 Replies
LEARN ABOUT PHP
datetime.sub
DATETIME.SUB(3) 1 DATETIME.SUB(3)
DateTime::sub - Subtracts an amount of days, months, years, hours, minutes and seconds from a DateTime object
Object oriented style
SYNOPSIS
public DateTime DateTime::sub (DateInterval $interval)
DESCRIPTION
Procedural style
DateTime date_sub (DateTime $object, DateInterval $interval)
Subtracts the specified DateInterval object from the specified DateTime object.
PARAMETERS
o $object
-Procedural style only: A DateTime object returned by date_create(3). The function modifies this object.
o $interval
- A DateInterval object
RETURN VALUES
Returns the DateTime object for method chaining or FALSE on failure.
EXAMPLES
Example #1
DateTime.sub(3) example
Object oriented style
<?php
$date = new DateTime('2000-01-20');
$date->sub(new DateInterval('P10D'));
echo $date->format('Y-m-d') . "
";
?>
Procedural style
<?php
$date = date_create('2000-01-20');
date_sub($date, date_interval_create_from_date_string('10 days'));
echo date_format($date, 'Y-m-d');
?>
The above examples will output:
2000-01-10
Example #2
Further DateTime.sub(3) examples
<?php
$date = new DateTime('2000-01-20');
$date->sub(new DateInterval('PT10H30S'));
echo $date->format('Y-m-d H:i:s') . "
";
$date = new DateTime('2000-01-20');
$date->sub(new DateInterval('P7Y5M4DT4H3M2S'));
echo $date->format('Y-m-d H:i:s') . "
";
?>
The above example will output:
2000-01-19 13:59:30
1992-08-15 19:56:58
Example #3
Beware when subtracting months
<?php
$date = new DateTime('2001-04-30');
$interval = new DateInterval('P1M');
$date->sub($interval);
echo $date->format('Y-m-d') . "
";
$date->sub($interval);
echo $date->format('Y-m-d') . "
";
?>
The above example will output:
2001-03-30
2001-03-02
NOTES
DateTime.modify(3) is an alternative when using PHP 5.2.
SEE ALSO
DateTime.add(3), DateTime.diff(3), DateTime.modify(3).
PHP Documentation Group DATETIME.SUB(3)