Please write your query clearly, try something like this just an example, remaining digits after decimal you have to convert to days and then you have to add .
I want to split a given month into weeks. For example if I give the date in dd/mm/yy format say 01/02/08 it should give output in the given format :
week1 : start date and end date.
week2 : ""
week3 : ""
week4 : "" (5 Replies)
munt=`date '+%m` will isolate the month in digit form 02 = Feb
Trying to get the same out of perl just cant see it
$stimx = localtime($^T);
print ((split/ /,$stimx)); (4 Replies)
Hello All,
I am trying to come up with a shell script to count a specific word in a logfile on each day of this month, last month and the month before. I need to produce this report and email it to customer.
Any ideas would be appreciated! (5 Replies)
I am writing the code in perl.
I have an array in perl and each variable in the array contains the data in the below format
Now I need to check the below variable w.r.t system month I need to store the date and time(Tue Aug 7 03:54:12 2012) from the below data into file if contains only 'Aug'... (5 Replies)
Hi,
I have a script that accepts an input date from the user in yyyy-mm-dd format.
I need to get the mm-dd part and convert it to month name.
example:
2011-11-15
I want that to become "Nov 15"
I don't have the GNU date, I am using an AIX os.
Thanks. (1 Reply)
Hi,
I need all file names in a folder which has date >= 10th of last month,
Example
: files in folder
AUTO_F1_20140610.TXT
BUTO_F1_20140616.TXT
CUTO_F1_20140603.TXT
FA_AUTO_06012014.TXT
LA_AUTO_06112014.TXT
MA_AUTO_06212014.TXT
ZA_AUTO_06232014.TXT
Output:
AUTO_F1_20140610.TXT... (9 Replies)
Hi Guys,
i am having .sql script which inserts data from one table to another table based on date condition, i need to pass range on based on how many number of months, for e.g
set timing on;
whenever sqlerror exit failure;
spool myscript.log append
accept start_date... (7 Replies)
# Sample input
common-name www.test.com.au
expiration Dec 21 01:00:31 2017 GMT
common-name www.test1.com.au
expiration Jan 19 04:41:03 2018 GMT
# Desired Output
# Field 1: Domain name
# Field 2: Date/time converted to Austraian format DD/MM/YYYY and on the same line as Domain Name.
#... (7 Replies)
Hello,
I need to find the date of next first Friday of the month and set as a variable in a bash script
ie -
FIRSTFRIDAY=$(date -dfirst-friday +%d)
I know date -dfirst-friday doesn't work, but unsure if I can use this / cal + awk or something else to find the right date of the... (7 Replies)
Discussion started by: summerdays
7 Replies
LEARN ABOUT PHP
date_default_timezone_get
DATE_DEFAULT_TIMEZONE_GET(3) 1 DATE_DEFAULT_TIMEZONE_GET(3)date_default_timezone_get - Gets the default timezone used by all date/time functions in a script
SYNOPSIS
string date_default_timezone_get (void )
DESCRIPTION
In order of preference, this function returns the default timezone by:
o Reading the timezone set using the date_default_timezone_set(3) function (if any)
o Prior to PHP 5.4.0
only: Reading the $TZ environment variable (if non empty)
o Reading the value of the date.timezone ini option (if set)
o Prior to PHP 5.4.0
only: Querying the host operating system (if supported and allowed by the OS). This uses an algorithm that has to guess the time-
zone. This is by no means going to work correctly for every situation. A warning is shown when this stage is reached. Do not rely
on it to be guessed correctly, and set date.timezone to the correct timezone instead.
If none of the above succeed, date_default_timezone_get will return a default timezone of UTC.
RETURN VALUES
Returns a string.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.4.0 | |
| | |
| | The TZ environment variable is no longer used to |
| | guess the timezone. |
| | |
| 5.4.0 | |
| | |
| | The timezone is no longer guessed from informa- |
| | tion available through the operating system as |
| | the guessed timezone can not be relied on. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
Getting the default timezone
<?php
date_default_timezone_set('Europe/London');
if (date_default_timezone_get()) {
echo 'date_default_timezone_set: ' . date_default_timezone_get() . '<br />';
}
if (ini_get('date.timezone')) {
echo 'date.timezone: ' . ini_get('date.timezone');
}
?>
The above example will output something similar to:
date_default_timezone_set: Europe/London
date.timezone: Europe/London
Example #2
Getting the abbreviation of a timezone
<?php
date_default_timezone_set('America/Los_Angeles');
echo date_default_timezone_get() . ' => ' . date('e') . ' => ' . date('T');
?>
The above example will output:
America/Los_Angeles => America/Los_Angeles => PST
SEE ALSO date_default_timezone_set(3), "List of Supported Timezones".
PHP Documentation Group DATE_DEFAULT_TIMEZONE_GET(3)