2013. 11. 19. 09:56
date -s YYYYMMDD.HHmmss

adb shell setprop persist.sys.timezone "America/Chicago"
from datetime import datetime

date_object = datetime.strptime('Jun 1 2005  1:33PM', '%b %d %Y %I:%M%p')

Link to the Python documentation for strptime

and a link for the strftime format mask

8.1.7. strftime() and strptime() Behavior

datedatetime, and time objects all support a strftime(format) method, to create a string representing the time under the control of an explicit format string. Broadly speaking, d.strftime(fmt) acts like the time module’s time.strftime(fmt, d.timetuple()) although not all objects support a timetuple() method.

Conversely, the datetime.strptime() class method creates a datetime object from a string representing a date and time and a corresponding format string. datetime.strptime(date_string, format) is equivalent to datetime(*(time.strptime(date_string, format)[0:6])).

For time objects, the format codes for year, month, and day should not be used, as time objects have no such values. If they’re used anyway, 1900 is substituted for the year, and 1 for the month and day.

For date objects, the format codes for hours, minutes, seconds, and microseconds should not be used, as date objects have no such values. If they’re used anyway, 0 is substituted for them.

The full set of format codes supported varies across platforms, because Python calls the platform C library’s strftime() function, and platform variations are common. To see the full set of format codes supported on your platform, consult the strftime(3)documentation.

The following is a list of all the format codes that the C standard (1989 version) requires, and these work on all platforms with a standard C implementation. Note that the 1999 version of the C standard added additional format codes.

The exact range of years for which strftime() works also varies across platforms. Regardless of platform, years before 1900 cannot be used.

DirectiveMeaningExampleNotes
%aWeekday as locale’s abbreviated name.
Sun, Mon, ..., Sat (en_US);
So, Mo, ..., Sa (de_DE)
(1)
%AWeekday as locale’s full name.
Sunday, Monday, ..., Saturday (en_US);
Sonntag, Montag, ..., Samstag (de_DE)
(1)
%wWeekday as a decimal number, where 0 is Sunday and 6 is Saturday.0, 1, ..., 6 
%dDay of the month as a zero-padded decimal number.01, 02, ..., 31 
%bMonth as locale’s abbreviated name.
Jan, Feb, ..., Dec (en_US);
Jan, Feb, ..., Dez (de_DE)
(1)
%BMonth as locale’s full name.
January, February, ..., December (en_US);
Januar, Februar, ..., Dezember (de_DE)
(1)
%mMonth as a zero-padded decimal number.01, 02, ..., 12 
%yYear without century as a zero-padded decimal number.00, 01, ..., 99 
%YYear with century as a decimal number.1970, 1988, 2001, 2013 
%HHour (24-hour clock) as a zero-padded decimal number.00, 01, ..., 23 
%IHour (12-hour clock) as a zero-padded decimal number.01, 02, ..., 12 
%pLocale’s equivalent of either AM or PM.
AM, PM (en_US);
am, pm (de_DE)
(1), (2)
%MMinute as a zero-padded decimal number.00, 01, ..., 59 
%SSecond as a zero-padded decimal number.00, 01, ..., 59(3)
%fMicrosecond as a decimal number, zero-padded on the left.000000, 000001, ..., 999999(4)
%zUTC offset in the form +HHMM or -HHMM (empty string if the the object is naive).(empty), +0000, -0400, +1030(5)
%ZTime zone name (empty string if the object is naive).(empty), UTC, EST, CST 
%jDay of the year as a zero-padded decimal number.001, 002, ..., 366 
%UWeek number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0.00, 01, ..., 53(6)
%WWeek number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0.00, 01, ..., 53(6)
%cLocale’s appropriate date and time representation.
Tue Aug 16 21:30:00 1988 (en_US);
Di 16 Aug 21:30:00 1988 (de_DE)
(1)
%xLocale’s appropriate date representation.
08/16/88 (None);
08/16/1988 (en_US);
16.08.1988 (de_DE)
(1)
%XLocale’s appropriate time representation.
21:30:00 (en_US);
21:30:00 (de_DE)
(1)
%%A literal '%' character.% 

Notes:

  1. Because the format depends on the current locale, care should be taken when making assumptions about the output value. Field orderings will vary (for example, “month/day/year” versus “day/month/year”), and the output may contain Unicode characters encoded using the locale’s default encoding (for example, if the current locale is ja_JP, the default encoding could be any one of eucJPSJIS, or utf-8; use locale.getlocale() to determine the current locale’s encoding).

  2. When used with the strptime() method, the %p directive only affects the output hour field if the %I directive is used to parse the hour.

  3. Unlike the time module, the datetime module does not support leap seconds.

  4. %f is an extension to the set of format characters in the C standard (but implemented separately in datetime objects, and therefore always available). When used with the strptime() method, the %f directive accepts from one to six digits and zero pads on the right.

    New in version 2.6.

  5. For a naive object, the %z and %Z format codes are replaced by empty strings.

    For an aware object:

    %z

    utcoffset() is transformed into a 5-character string of the form +HHMM or -HHMM, where HH is a 2-digit string giving the number of UTC offset hours, and MM is a 2-digit string giving the number of UTC offset minutes. For example, ifutcoffset() returns timedelta(hours=-3, minutes=-30)%z is replaced with the string '-0330'.

    %Z

    If tzname() returns None%Z is replaced by an empty string. Otherwise %Z is replaced by the returned value, which must be a string.

  6. When used with the strptime() method, %U and %W are only used in calculations when the day of the week and the year are specified.

Footnotes

[1]

If, that is, we ignore the effects of Relativity

View Full Version : HOW-TO: Set system time clock with rdate


Mr. Gadget
02-08-2011, 08:29 PM
Set your system time with RDATE or NTPD

You can set your PBO system time clock to the current time using the command 'rdate'. You will need to download and add the latest Busybox commands (do not overlay on existing commands, unless you know what you are doing). 

1) Perform the addition of the latest Busybox commands to your system. You can run them from your HD or USB, not sure about using internal memory. The Busybox file is only 1.6Mb, but I would not want to deny the OS from using available space. If you want to test this feature before making it permanent, insert a USB drive on the PBO, browse to the USB drive from your PC, map it to a drive letter like V:, then download busybox-mipsel.asc file to the mapped/USB drive (save target, and add the file extension .asc).

Snappy has this file information listed here: http://www.patriotmem.com/forums/showthread.php?t=3737

A quick test to see if the new BBox commands work (I placed my file in the root of the front USB, which is /tmp/usbmounts/sda1). 

Create an alias to your new commands on Venus:

Venus> alias bb="/tmp/usbmounts/sda1/busybox-mipsel.asc"

Test it with 'whoami', it should return root, if you get "-sh: whoami: not found" you are not linked to the proper file.

Venus> bb whoami
root


2) Next you should modify your /etc/profile to match your proper TZ (timezone). Example: TZ=MST7MDT
This will allow you to see your time in your local format (assuming the timezone file is current for your location, too detailed for this mod).

You can display the 'current' set date/time for your timezone, but if you did not set the date manually already, it will be wrong. Just enter the command 'date'. Don't worry about any of the fields other than your timezone, ie MST, PST...

3) Now your system is armed to get access and display the proper time. So, first we will update the System clock from the network. We need to use an older time server since most do not accept the rdate protocol command. If we can get NTP loaded on the PBO, then we can use any Stratum NTP server available (pool.ntp.org). 

Enter the command:

Venus> bb rdate -sp time-nw.nist.gov
Tue Feb 8 12:53:33 2011

So now your system has the correct time. But the hardware clock is still out of sync with the system time. We can view this using the 'hwclock' command.

Venus> hwclock
Thu Dec 31 17:12:33 2009 0000000000.000000 seconds

Let's fix the hardware clock and sync it with the system clock.

Venus> hwclock -w

Now verify the System clock and Hardware clock are in sync. Just enter the 'date' command, then compare with the 'hwclock' command results.

Your system is now set to the current time, and your display should be set to your local timezone.

Update: Use NTP to set clock. Can ignore hwclock settings at this point in time, the RTC does not advance after setting anyway.

(Verbose mode)
Venus> bb ntpd -dnq -p pool.ntp.org

(Quiet mode)
Venus> bb ntpd -nq -p pool.ntp.org


TODO:
Decide which clock is more important: System (telnet) time, or PBO (GUI) time.
(GUI Time displays UTC time, telnet system clock shows TZ time).

Make it permanent (every system boot).

DONE:
Install NTP for greater accuracy and more system support. Part of the new busybox command set.

WOW -- The hwclock clock NEVER advances automatically - something I hadn't noticed at first. I thought it was slow.
aasoror
02-08-2011, 11:35 PM
Excellent write up,
Thanks,
IanC
02-09-2011, 06:48 AM
I suspect the "drift" is why some of the firmwares have dropped the ability to set the time.
grill
03-20-2011, 06:04 PM
The NTPD work fine, but how did that NTPD refresh automatically every time when I turn on the PBO? :rolleyes:
aasoror
03-20-2011, 09:09 PM
The NTPD work fine, but how did that NTPD refresh automatically every time when I turn on the PBO? :rolleyes:

You can add whatever commands that starts the service to your /usr/local/etc/rcS (startup script).
grill
03-21-2011, 07:01 PM
Thank you! :)
jamaroney
05-21-2012, 11:31 AM
I installed busybox 1.18.1 on my PBO successfully. When I run "ntpd -nq -p pool.ntp.org" via telnet after startup, it works fine, but it doesn't work when I put it in rcS. Am I doing anything wrong, or will it simply not work in the startup script?
snappy46
05-21-2012, 03:11 PM
I installed busybox 1.18.1 on my PBO successfully. When I run "ntpd -nq -p pool.ntp.org" via telnet after startup, it works fine, but it doesn't work when I put it in rcS. Am I doing anything wrong, or will it simply not work in the startup script?

My guess would be that your network connection is not active yet when running from the rcS file. I personnally only have one extra entry in my rcS file to another script which make all the magic happen. The first thing that happen in my script is a loop to make sure my network (wireless/ethernet) is up an running before anything happen. After that loop is completed I then mount my NAS, setup the time, launch lighttpd etc......

Hope this helps!

Cheers!!!
Mr. Gadget
05-21-2012, 05:54 PM
I have a few dirty programs I use to boot my system. 
First, I added a call in the rcS1 file to myStartup.sh (see imbedded comment)

Then, myStartup.sh calls all of my utilities to do my system setup:
1) Run setMGWY.sh to determine what the default gateway should be
2) Run chknet.sh to see if the network is operational yet
3) Run getTime.sh to set the time using NTPD
4) Run myMount.sh to mount my SMB shares (not included here)

You may name the programs with our without the .sh, if you add, then be sure to edit the files to include the correct name. 
(By default, the only file with .sh is myStartup.sh)

File: myStartup.sh


File: myStartup.sh

#!/bin/sh
# myStartup.sh
# Date: 20110804 V1.21
# Date: 20120103 V1.21b Change from HDD to USB (Mars), Removed SYSLOG and looger (too much memory used)
# Date: 20120521 V1.21c Cleanup
# This program will check the status of the network, if up 
# it will set time, mount shares, and whatever else is needed if network up.
# If network down, you can do something else.
# If used in rcS1, be sure to make verbose 0 (no output)
# Expects busybox to be in ???

# Add/Edit your /etc/init.d/rcS1 - (remove comments ##!# below) 120103 (mount -o remount,rw /)
### file rcS1
### Added 120103 - If usb attached. wait till ready, run myStartup commands, else bypass
##!#sleep 20
##!#if [ -e /tmp/usbmounts/sdb1/bin/scripts/myStartup.sh ]; then
### echo "File exists"
##!# /tmp/usbmounts/sdb1/bin/scripts/myStartup.sh&
##!#fi

# Usually, the IP is for the router/gateway
# Programs used: 
# Syntax: 
# chknet [-i IP|MGWY] [-c count] [-q] [-h]
# getTime [-q]
# setMGWY [-q]
# myMount [-q]
# Start USER DEFINED Programs:
CKNET="/tmp/usbmounts/sdb1/bin/scripts/chknet"
STMGY="/tmp/usbmounts/sdb1/bin/scripts/setMGWY"
GTIM="/tmp/usbmounts/sdb1/bin/scripts/getTime"
MYMNT="/tmp/usbmounts/sdb1/bin/scripts/myMount"
# End USER DEFINED Programs

# Start SYSLOG (too much memory used)
##/etc/init.d/syslog.rcS -p /tmp/hdd/volumes/HDD1/logs/syslog&
#logger " $(date) - Syslog started at boot"

# Locate the Default gateway router, set MGWY variable (this may have trouble - redo to file?)
. $STMGY

# TEMP What is set?
##set

# See if network is operational
$CKNET -q
# Save the exit status of last command
status=$?
if [ $status == 0 ];
then
# Do something if network is UP
##echo "GOOD Status is (0 or 0)" $? " chknet status is " $status
# Set the Time of day from NTP
$GTIM -q
# Mount my SMB shares
$MYMNT -q
#logger " $(date) - MyStartup completed succesfully"
else
# Do something if network is DOWN
##echo "BAD Status is (1 or 100)" $? " chknet status is " $status
logger " $(date) - MyStartup did not complete succesfully, Status: $status"
fi 
# and finis

# end myStartup


Next post included files (too long for original post)

Good Luck, hope these help.
Mr. Gadget
05-21-2012, 05:56 PM
Part 2, Utility Files

File: setMGWY


File: setMGWY.sh

#!/bin/sh
# Date: 20110628 v1.1
tver="v1.1"
# By: Mr. Gadget
# Script: setMGWY
# Purpose: Create a Global variable MGWY used other programs, such as:
# chknet, getTime, myMount ...
# Use netstat to locate Gateway, save to temp file, and make global variable MGWY.
# (Others may find faster methods to accomplish same).
# Note: To make variable global (parent shell) use ". path/setMGWY"
#
# Input: None
# Output: Environment variable MGWY
#####################################
# Identify our current gateway. Not sure what it looks like if no network.
netstat -r -n | grep ^0.0.0.0 | awk '{print $2}' >/tmp/mynet.tmp
read MGWY </tmp/mynet.tmp
# Debug echo (uncomment #.#)
#.#echo "MGWY is $MGWY"
export MGWY
# Debug export (uncomment #.#)
#.#export
# end setMGWY


File: chknet


File: chknet.sh

#!/bin/sh
# Date: 20110628 v5.4
# Date: 20110928 v5.4a Modify from HDD to USB - Use Direct link to awk (gawk)
# Date: 20120112 v5.4b awk fixed with MegaPack Update
tver="v5.4b"
# By: Mr. Gadget
# Script: chknet [-i IP] [-c count] [-q] [-h]
# where -i IP = xxx.xxx.xxx.xxx (or $MGWY)
# -c count = 1-n (1=22seconds, 2=33seconds, 3=44...) delay (or $PLOOP)
# -q (quiet, otherwise verbose) (or $VERBOSE=0 or 1)
# Status Returns: 0 if network up, 1 invalid input, 2 invalid BusyBox, 100 if network down
# Purpose:
# This script will loop on checking the network status Up or Down, 
# and then return status code 0 for UP and 100 for DOWN.
# The loop count is user selectable to avoid endless loop.
# DO NOT RUN IN VERBOSE MODE within your rcS
# This program REQUIRES the updated BusyBox (V1.16+) command parser
# with the extra PING features. 
# Get the advanced Busybox here (save with extension .asc)
# http://busybox.net/downloads/binaries/1.16.1/busybox-mipsel
# also
# http://playon.unixstorm.org/download/tools/busybox1.18.3
# Tip: Make an alias in /etc/profile, 
# alias bb="/tmp/hdd/volumes/HDD1/bin/busyboxxxxx.asc"
# for ongoing use of the advanced busybox commands for interactive use.

##### USER-SPECIFICS
# Choices for file locations of your Busybox binaries:
# Internal HDD Small partition /tmp/hdd/root (part3 = 512MB, type ext3)
# Internal HDD Large partition /tmp/hdd/volumes/HDD1 (part1 = 500GB, type ufsd)
# Removable USB /tmp/usbmounts/sdb1 (host3 part1 = 8GB, type vfat)
# Removable USB /tmp/usbmounts/sda1 (UNUSED)
# Define where your updated BusyBox image is located (not Flash)
# I use the bin folder on the USB drive for this PBO (in case I need to remove it to bypass my startups)
#MBB="/tmp/hdd/volumes/HDD1/bin/busybox-mipsel.asc"
#MBB="/tmp/hdd/volumes/HDD1/bin/busybox1.18.3.asc"
MBB="/tmp/usbmounts/sdb1/bin/busybox1.18.3.asc"
# Bug in previous BB. If needed, Use awk file /usr/local/bin/package/awk" (FIXED with MegaPack update)


### Define your default gateway if you want
tmgwy="192.168.1.253"
### Define Default loop count 1=22sec, 2=33sec, 3=44sec ...
tploop=5
### Define Default Verbose (not quiet).
tverbose=1
#### END USER-SPECIFICS

### oh, check to see if we have access to a good BusyBox image, exit error 2 if not found
if [ ! -s "$MBB" ]; 
then
echo "No path to extended Busybox file"
exit 2
fi

### OK to proceed if updated Busybox available

### Test if input options specified, or use Global vars ($MGWY, $PLOOP, $VERBOSE)
args=`getopt i:c:qh $*`
if test $? != 0
then
echo 'Version: '$tver;\
echo 'Usage: '$0' [OPTIONS]'; echo '';\
echo 'Options:'; echo ' -i IP Check if Host IP is Up/Down'; \
echo ' Global Variable $MGWY may be used.'; \
echo ' -c CNT Loop delay count, [5] = 66 seconds'; \
echo ' Global Variable $PLOOP may be used.'; \
echo ' -q Quiet mode. No output.'; \
echo 'Status:'; echo ' 0 = Host up, 1 = invalid input, 2 = invalid Busybox file, 100 = Host down' 
exit 1
fi

### We may or may not have input, set the arguments
#.#echo "Args are: " $args
set -- $args

### Parse out the arguments, and shift as required.
for i
do
case "$i" in
-i) opt_i=$2;shift;shift;;
-c) opt_c=$2;shift;shift;;
-q) opt_q=$1;shift;;
-h) echo ''; \
echo 'chknet Version: '$tver;\
echo 'Usage: '$0' [OPTIONS]'; echo '';\
echo 'Options:'; echo ' -i IP Check if Host IP is Up/Down'; \
echo ' Global Variable $MGWY may be used.'; \
echo ' -c CNT Loop delay count, [5] = 66 seconds'; \
echo ' Global Variable $PLOOP may be used.'; \
echo ' -q Quiet mode. No output.'; \
echo 'Status:'; echo ' 0 = Host up, 1 = invalid input, 2 = invalid Busybox file, 100 = Host down'
exit 1
esac
done

### If we did not pass any (-i) IP options, use either the global exported MGWY or assign a gateway.
if [ -n "$opt_i" ];
then
### Do something if TRUE, like save the -i input
###echo "Valid var opt_i=$opt_i, use it"
MGWY=$opt_i
else
### Do something if FALSE, like assign the Global var or a temp IP
###echo "Try if global MGWY=$MGWY, else set to temp gateway"
[ "$MGWY" ] || MGWY="$tmgwy"
fi

### If we did not pass any (-c) COUNT options, use either the global exported PLOOP or assign a value
if [ -n "$opt_c" ];
then
### Do something if TRUE, like save the -c input
###echo "Valid var opt_c=$opt_c, use it"
PLOOP=$opt_c
else
### Do something if FALSE, like assign the Global var or a temp CNT
###echo "Try if global PLOOP=$PLOOP, else set to temp count"
[ "$PLOOP" ] || PLOOP=$tploop
fi

### If we did not pass any (-q) QUIET options then go verbose
if [ -n "$opt_q" ];
then
### Do something if TRUE, like save the -q input
###echo "Valid var opt_q=$opt_q, use it"
VERBOSE=0
else
### Do something if FALSE, like assign the Global var or a temp Verbose
###echo "Try if global VERBOSE=$VERBOSE, else set to VERBOSE"
[ "$VERBOSE" ] || VERBOSE=$tverbose
fi

### debug ###
#.#echo "mgwy " $MGWY
#.#echo "ploop " $PLOOP
#.#echo "verbose " $VERBOSE
### debug ###

### OK, we have all our inputs, lets go to work.
### Setup if Quiet or Verbose. Output logic: NON-VERBOSE = 0 , VERBOSE = 1 (default)
########### WARNING ###########
# DO NOT run this in the /usr/local/etc/rcS with output enabled
# If using as a local script may use -q or not, in rcS, wse -q
########### WARNING ###########

### Make a redirect command for output (if verbose or not)
redir_cmd() { 
### Are we verbose(1) or quiet(0)
if [ "$VERBOSE" -eq 0 ];
then 
"$@" > /dev/null 
else 
"$@" 
fi 
}

### Lets get started - Define a pinger function and then test if target host IP up
# If network up, exit with status 0, otherwise exit with status 100 (failed)
#redir_cmd echo "Target IP = "$MGWY
# Create awk function to use extended busybox ping with cnt feature
## If your version of native awk is broken, use the version in the package directory
##/usr/local/bin/package/awk ' function pinger(count,ip) {
awk ' function pinger(count,ip) {
command = "'$MBB' ping -c "count " " ip
while (( command | getline res )> 0 ) {
if ( res ~ /0 received|100% packet loss/ ) {
close(command)
return 100
} # IF packet loss
} # WHILE ping
close(command)
return 0
} # FUNCTION pinger
BEGIN { 
IP="'$MGWY'" # Identify the target host
VERB="'$VERBOSE'" # Verbose?
looper='$PLOOP' # how many iterations to test
if ( VERB == 1 ) { print "Checking host " IP " for " looper " iterations, or unless up" }
if ( pinger(2,IP) == 100 ) {
if ( VERB == 1 ) { printf IP " Not up.." }
c = 0
while ( c < looper ) { # we were not up on first pass, keep trying
if ( pinger(2,IP) == 100 ) {
c=c+1
#if ( VERB == 1 ) { print IP " Not up yet." }
if ( VERB == 1 ) { printf " Not up.." }
} else 
{ if ( VERB == 1 ) { print IP " up." }
c=looper
exit 0} # We are up now, so stop while and set exit status
} # While
exit 100 # We are still down
} else { 
if ( VERB == 1 ) { print IP " up." } 
exit 0 } # If the first pass is good, then we are up
} # BEGIN function pinger begin
END {
if ( VERB == 1 ) { print "Exiting. " $0 }
} # END function pinger end
' # awk end
# Were done here -- How did we do - If 0, then network UP, if 100, then network DOWN
##End chknet



Continued in next post.
Mr. Gadget
05-21-2012, 05:57 PM
Part 3, Utility Files

File: getTime


File: getTime.sh

#!/bin/sh
# Date: 20110627 V1.0
# Date: 20110804 V3.1
# Date: 20110804 V3.1b - Change loation for NO HDD - USB only
tver="3.1b"
# By: Mr. Gadget
# Script: getTime [-q]
# Option:
# -q quietmode, no output reported
# Status: 0 = success, 1 = invalid input, 2 = missing Busybox, 100 = network down
#
# This script will set the PBO clock using the updated BusyBox (V1.18) command parser
# with the NTPD feature. Use options for verbose on or off.
# Get the advanced Busybox here (save with extension .asc)
# http://busybox.net/downloads/binaries/1.16.1/busybox-mipsel
# Tip: Make an alias in /etc/profile, 
# alias bb="/tmp/hdd/volumes/HDD1/bin/busybox-mipsel.asc"
# for ongoing use of the advanced busybox commands for interactive use.
# Be sure to modify /etc/profile with your proper TZ (timezone) too.
# Example: TZ='MST7MDT6,J72,J310'

# USER-SPECIFICS
### use either the global exported MGWY or this temp gateway assignment.
# Define your Gateway-Router IP address
tmgwy="192.168.1.253"

# Use can also use prog setMGWY to define variable for your Default Gateway
#echo "Try if global MGWY=$MGWY, else set to temp gateway"
# Which gateway assignment, check if global variable available, else use local
[ "$MGWY" ] || MGWY="$tmgwy"
### echo "MGWY is " $MGWY

# Choices for file locations of your binaries:
# Internal HDD Small partition /tmp/hdd/root (part3 = 512MB, type ext3)
# Internal HDD Large partition /tmp/hdd/volumes/HDD1 (part1 = 500GB, type ufsd)
# Removable USB Rear /tmp/usbmounts/sdb1 (host3 part1 = 8GB, type vfat)
# Removable USB Front /tmp/usbmounts/sda1 (UNUSED)
# Define where your updated BusyBox image is located (not Flash)
# I use the bin folder on the USB (for quick removal/bypass capbility)
#MBB="/tmp/hdd/volumes/HDD1/bin/busybox-mipsel.asc"
#MBB="/tmp/hdd/volumes/HDD1/bin/busybox1.18.3.asc"
MBB="/tmp/usbmounts/sdb1/bin/busybox1.18.3.asc"
CKNET="/tmp/usbmounts/sdb1/bin/scripts/chknet"
# END USER-SPECIFICS

### Test if input options specified
args=`getopt qh $*`
if test $? != 0
then
echo 'Version: '$tver;\
echo 'Usage: '$0' [OPTIONS]'; echo '';\
echo 'Options:'; echo ' -q Quiet mode.'
exit 1
fi

### We may or may not have input, set the arguments
#.#echo "Args are: " $args
set -- $args

### Parse out the arguments, and shift as required.
for i
do
case "$i" in
-q) opt_q=$1;shift;;
-h) echo ''; \
echo 'getTime Version: '$tver;\
echo 'Usage: '$0' [OPTIONS]'; echo '';\
echo 'Options:'; echo ' -q Quiet mode.'
exit 1
esac
done

### If we did not pass any (-q) quite options, make it verbose.
if [ -n "$opt_q" ];
then
### Do something if TRUE, like save the -q input
###echo "Valid var opt_q=$opt_q, use it"
## Be real quiet
VERBOSE=0
##echo "I need to be quiet"
else
### Do something if FALSE
VERBOSE=1
##echo "I can be verbose"
fi

# Make a redirect command for output
redir_cmd() { 
# Are we verbose or not (set busybox ntpd verbose -d option too)
if [ "$VERBOSE" -eq 0 ];
then 
NTPV="-nq"
"$@" > /dev/null 
else 
NTPV="-dnq"
"$@" 
fi 
}

# Start:
# First verify the network is up before we try to get the time.
# Validate acccess to your Router-Gateway MGWY.
redir_cmd echo "Setting the clock from NTP"
# Wait for the network to come up before we access the network

$CKNET -i $MGWY -c 3 -q

# Save the exit status of last command
status=$?
if [ $status -eq 0 ];
then
# Do something if network is UP
# Network is up, how about setting the clock, 
# oh, check to see if we have access to a good BusyBox image
#
if [ -s $MBB ]; then
# File is good, Get time from NTP.ORG
$MBB ntpd $NTPV -p pool.ntp.org
redir_cmd date
exit 0
else
# File not found - better get it right!
redir_cmd echo "File $MBB not found"
exit 2
fi
redir_cmd echo "Done"
else
# Do something if network is DOWN
redir_cmd echo "Network not running. Time not set."
exit 100
fi 

# end getTime


If you want to see myMount.sh, let me know (it also uses chknet to see if network is up, then mount shares).
jamaroney
05-21-2012, 06:27 PM
I'll check this all out - thanks!!
jamaroney
05-22-2012, 12:45 PM
I tried the simple approach: I placed the "ntpd -nq -p pool.ntp.org" command at the very end of the rcS script, immediately preceded by "sleep 30".

For now, that seems to be working well for my setup.
Mr. Gadget
05-22-2012, 03:24 PM
Good to hear it works for you. 
Just a word of caution, if the network is not operational for any reason (using PBO in hotel, on the road...), some commands may not allow your PBO to boot completely (if you are waiting for the network). Be sure to test your commands in various situations if you plan to take it on the road.



list of timezone

원문 : http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

List of tz database time zones

From Wikipedia, the free encyclopedia
World map showing time zones from the tz database version 2009r

This is a list of time zones in the tz database release 2012c. The list is derived from the zones, links, and rules specified in zone.tab and the 7 "continent files" – africaantarcticaasiaaustralasia,europenorthamerica, and southamerica.

The four columns in zone.tab are mapped into columns 1–4 (marked with *) in the table below. The file contains the following comments:

# This file contains a table with the following columns:
# 1.  ISO 3166 2-character country code.  See the file `iso3166.tab'.
# 2.  Latitude and longitude of the zone's principal location
#     in ISO 6709 sign-degrees-minutes-seconds format,
#     either +-DDMM+-DDDMM or +-DDMMSS+-DDDMMSS,
#     first latitude (+ is north), then longitude (+ is east).
# 3.  Zone name used in value of TZ environment variable.
# 4.  Comments; present if and only if the country has multiple rows.

The UTC offsets (columns 5 and 6) are parsed from the "continent files" and are in the format {+|-}hh:mm where the sign is + for east of UTC or - for west of UTC, and hh and mm are hours and minutes, respectively. The UTC DST offset is different from the UTC offset for zones where daylight saving time is observed (see individual time zone pages for details).

The table is sorted by TZ by default.

List[edit]

CC*Coordinates*TZ*Comments*UTC offsetUTC DST offsetNotes
CI+0519-00402Africa/Abidjan+00:00+00:00
GH+0533-00013Africa/Accra+00:00+00:00
ET+0902+03842Africa/Addis_Ababa+03:00+03:00
DZ+3647+00303Africa/Algiers+01:00+01:00
ER+1520+03853Africa/Asmara+03:00+03:00
Africa/Asmera+03:00+03:00Link to Africa/Asmara
ML+1239-00800Africa/Bamako+00:00+00:00
CF+0422+01835Africa/Bangui+01:00+01:00
GM+1328-01639Africa/Banjul+00:00+00:00
GW+1151-01535Africa/Bissau+00:00+00:00
MW-1547+03500Africa/Blantyre+02:00+02:00
CG-0416+01517Africa/Brazzaville+01:00+01:00
BI-0323+02922Africa/Bujumbura+02:00+02:00
EG+3003+03115Africa/Cairo+02:00+02:00DST has been canceled since 2011
MA+3339-00735Africa/Casablanca+00:00+01:00
ES+3553-00519Africa/CeutaCeuta & Melilla+01:00+02:00
GN+0931-01343Africa/Conakry+00:00+00:00
SN+1440-01726Africa/Dakar+00:00+00:00
TZ-0648+03917Africa/Dar_es_Salaam+03:00+03:00
DJ+1136+04309Africa/Djibouti+03:00+03:00
CM+0403+00942Africa/Douala+01:00+01:00
EH+2709-01312Africa/El_Aaiun+00:00+00:00
SL+0830-01315Africa/Freetown+00:00+00:00
BW-2439+02555Africa/Gaborone+02:00+02:00
ZW-1750+03103Africa/Harare+02:00+02:00
ZA-2615+02800Africa/Johannesburg+02:00+02:00
SS+0451+03136Africa/Juba+03:00+03:00
UG+0019+03225Africa/Kampala+03:00+03:00
SD+1536+03232Africa/Khartoum+03:00+03:00
RW-0157+03004Africa/Kigali+02:00+02:00
CD-0418+01518Africa/Kinshasawest Dem. Rep. of Congo+01:00+01:00
NG+0627+00324Africa/Lagos+01:00+01:00
GA+0023+00927Africa/Libreville+01:00+01:00
TG+0608+00113Africa/Lome+00:00+00:00
AO-0848+01314Africa/Luanda+01:00+01:00
CD-1140+02728Africa/Lubumbashieast Dem. Rep. of Congo+02:00+02:00
ZM-1525+02817Africa/Lusaka+02:00+02:00
GQ+0345+00847Africa/Malabo+01:00+01:00
MZ-2558+03235Africa/Maputo+02:00+02:00
LS-2928+02730Africa/Maseru+02:00+02:00
SZ-2618+03106Africa/Mbabane+02:00+02:00
SO+0204+04522Africa/Mogadishu+03:00+03:00
LR+0618-01047Africa/Monrovia+00:00+00:00
KE-0117+03649Africa/Nairobi+03:00+03:00
TD+1207+01503Africa/Ndjamena+01:00+01:00
NE+1331+00207Africa/Niamey+01:00+01:00
MR+1806-01557Africa/Nouakchott+00:00+00:00
BF+1222-00131Africa/Ouagadougou+00:00+00:00
BJ+0629+00237Africa/Porto-Novo+01:00+01:00
ST+0020+00644Africa/Sao_Tome+00:00+00:00
Africa/Timbuktu+00:00+00:00Link to Africa/Bamako
LY+3254+01311Africa/Tripoli+02:00+02:00
TN+3648+01011Africa/Tunis+01:00+01:00
NA-2234+01706Africa/Windhoek+01:00+02:00
AKST9AKDT−09:00−08:00Link to America/Anchorage
US+515248-1763929America/AdakAleutian Islands−10:00−09:00
US+611305-1495401America/AnchorageAlaska Time−09:00−08:00
AI+1812-06304America/Anguilla−04:00−04:00
AG+1703-06148America/Antigua−04:00−04:00
BR-0712-04812America/AraguainaTocantins−03:00−03:00
AR-3436-05827America/Argentina/Buenos_AiresBuenos Aires (BA, CF)−03:00−03:00
AR-2828-06547America/Argentina/CatamarcaCatamarca (CT), Chubut (CH)−03:00−03:00
America/Argentina/ComodRivadavia−03:00−03:00Link toAmerica/Argentina/Catamarca
AR-3124-06411America/Argentina/Cordobamost locations (CB, CC, CN, ER, FM, MN, SE, SF)−03:00−03:00
AR-2411-06518America/Argentina/JujuyJujuy (JY)−03:00−03:00
AR-2926-06651America/Argentina/La_RiojaLa Rioja (LR)−03:00−03:00
AR-3253-06849America/Argentina/MendozaMendoza (MZ)−03:00−03:00
AR-5138-06913America/Argentina/Rio_GallegosSanta Cruz (SC)−03:00−03:00
AR-2447-06525America/Argentina/Salta(SA, LP, NQ, RN)−03:00−03:00
AR-3132-06831America/Argentina/San_JuanSan Juan (SJ)−03:00−03:00
AR-3319-06621America/Argentina/San_LuisSan Luis (SL)−03:00−03:00
AR-2649-06513America/Argentina/TucumanTucuman (TM)−03:00−03:00
AR-5448-06818America/Argentina/UshuaiaTierra del Fuego (TF)−03:00−03:00
AW+1230-06958America/Aruba−04:00−04:00
PY-2516-05740America/Asuncion−04:00−03:00
CA+484531-0913718America/AtikokanEastern Standard Time - Atikokan, Ontario and Southampton I, Nunavut−05:00−05:00
America/Atka−10:00−09:00Link to America/Adak
BR-1259-03831America/BahiaBahia−03:00−02:00
MX+2048-10515America/Bahia_BanderasMexican Central Time - Bahia de Banderas−06:00−05:00
BB+1306-05937America/Barbados−04:00−04:00
BR-0127-04829America/BelemAmapa, E Para−03:00−03:00
BZ+1730-08812America/Belize−06:00−06:00
CA+5125-05707America/Blanc-SablonAtlantic Standard Time - Quebec - Lower North Shore−04:00−04:00
BR+0249-06040America/Boa_VistaRoraima−04:00−04:00
CO+0436-07405America/Bogota−05:00−05:00
US+433649-1161209America/BoiseMountain Time - south Idaho & east Oregon−07:00−06:00
America/Buenos_Aires−03:00−03:00Link toAmerica/Argentina/Buenos_Aires
CA+690650-1050310America/Cambridge_BayMountain Time - west Nunavut−07:00−06:00
BR-2027-05437America/Campo_GrandeMato Grosso do Sul−04:00−03:00
MX+2105-08646America/CancunCentral Time - Quintana Roo−06:00−05:00
VE+1030-06656America/Caracas−04:30−04:30
America/Catamarca−03:00−03:00Link toAmerica/Argentina/Catamarca
GF+0456-05220America/Cayenne−03:00−03:00
KY+1918-08123America/Cayman−05:00−05:00
US+415100-0873900America/ChicagoCentral Time−06:00−05:00
MX+2838-10605America/ChihuahuaMexican Mountain Time - Chihuahua away from US border−07:00−06:00
America/Coral_Harbour−05:00−05:00Link to America/Atikokan
America/Cordoba−03:00−03:00Link toAmerica/Argentina/Cordoba
CR+0956-08405America/Costa_Rica−06:00−06:00
CA+4906-11631America/CrestonMountain Standard Time - Creston, British Columbia−07:00−07:00
BR-1535-05605America/CuiabaMato Grosso−04:00−03:00
CW+1211-06900America/Curacao−04:00−04:00
GL+7646-01840America/Danmarkshavneast coast, north of Scoresbysund+00:00+00:00
CA+6404-13925America/DawsonPacific Time - north Yukon−08:00−07:00
CA+5946-12014America/Dawson_CreekMountain Standard Time - Dawson Creek & Fort Saint John, British Columbia−07:00−07:00
US+394421-1045903America/DenverMountain Time−07:00−06:00
US+421953-0830245America/DetroitEastern Time - Michigan - most locations−05:00−04:00
DM+1518-06124America/Dominica−04:00−04:00
CA+5333-11328America/EdmontonMountain Time - Alberta, east British Columbia & west Saskatchewan−07:00−06:00
BR-0640-06952America/EirunepeW Amazonas−04:00−04:00
SV+1342-08912America/El_Salvador−06:00−06:00
America/Ensenada−08:00−07:00Link to America/Tijuana
America/Fort_Wayne−05:00−04:00Link toAmerica/Indiana/Indianapolis
BR-0343-03830America/FortalezaNE Brazil (MA, PI, CE, RN, PB)−03:00−03:00
CA+4612-05957America/Glace_BayAtlantic Time - Nova Scotia - places that did not observe DST 1966-1971−04:00−03:00
GL+6411-05144America/Godthabmost locations−03:00−02:00
CA+5320-06025America/Goose_BayAtlantic Time - Labrador - most locations−04:00−03:00
TC+2128-07108America/Grand_Turk−05:00−04:00
GD+1203-06145America/Grenada−04:00−04:00
GP+1614-06132America/Guadeloupe−04:00−04:00
GT+1438-09031America/Guatemala−06:00−06:00
EC-0210-07950America/Guayaquilmainland−05:00−05:00
GY+0648-05810America/Guyana−04:00−04:00
CA+4439-06336America/HalifaxAtlantic Time - Nova Scotia (most places), PEI−04:00−03:00
CU+2308-08222America/Havana−05:00−04:00
MX+2904-11058America/HermosilloMountain Standard Time - Sonora−07:00−07:00
US+394606-0860929America/Indiana/IndianapolisEastern Time - Indiana - most locations−05:00−04:00
US+411745-0863730America/Indiana/KnoxCentral Time - Indiana - Starke County−06:00−05:00
US+382232-0862041America/Indiana/MarengoEastern Time - Indiana - Crawford County−05:00−04:00
US+382931-0871643America/Indiana/PetersburgEastern Time - Indiana - Pike County−05:00−04:00
US+375711-0864541America/Indiana/Tell_CityCentral Time - Indiana - Perry County−06:00−05:00
US+384452-0850402America/Indiana/VevayEastern Time - Indiana - Switzerland County−05:00−04:00
US+384038-0873143America/Indiana/VincennesEastern Time - Indiana - Daviess, Dubois, Knox & Martin Counties−05:00−04:00
US+410305-0863611America/Indiana/WinamacEastern Time - Indiana - Pulaski County−05:00−04:00
America/Indianapolis−05:00−04:00Link toAmerica/Indiana/Indianapolis
CA+682059-1334300America/InuvikMountain Time - west Northwest Territories−07:00−06:00
CA+6344-06828America/IqaluitEastern Time - east Nunavut - most locations−05:00−04:00
JM+1800-07648America/Jamaica−05:00−05:00
America/Jujuy−03:00−03:00Link to America/Argentina/Jujuy
US+581807-1342511America/JuneauAlaska Time - Alaska panhandle−09:00−08:00
US+381515-0854534America/Kentucky/LouisvilleEastern Time - Kentucky - Louisville area−05:00−04:00
US+364947-0845057America/Kentucky/MonticelloEastern Time - Kentucky - Wayne County−05:00−04:00
America/Knox_IN−06:00−05:00Link to America/Indiana/Knox
BQ+120903-0681636America/Kralendijk−04:00−04:00Link to America/Curacao
BO-1630-06809America/La_Paz−04:00−04:00
PE-1203-07703America/Lima−05:00−05:00
US+340308-1181434America/Los_AngelesPacific Time−08:00−07:00
America/Louisville−05:00−04:00Link toAmerica/Kentucky/Louisville
SX+180305-0630250America/Lower_Princes−04:00−04:00Link to America/Curacao
BR-0940-03543America/MaceioAlagoas, Sergipe−03:00−03:00
NI+1209-08617America/Managua−06:00−06:00
BR-0308-06001America/ManausE Amazonas−04:00−04:00
MF+1804-06305America/Marigot−04:00−04:00Link to America/Guadeloupe
MQ+1436-06105America/Martinique−04:00−04:00
MX+2550-09730America/MatamorosUS Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas near US border−06:00−05:00
MX+2313-10625America/MazatlanMountain Time - S Baja, Nayarit, Sinaloa−07:00−06:00
America/Mendoza−03:00−03:00Link toAmerica/Argentina/Mendoza
US+450628-0873651America/MenomineeCentral Time - Michigan - Dickinson, Gogebic, Iron & Menominee Counties−06:00−05:00
MX+2058-08937America/MeridaCentral Time - Campeche, Yucatan−06:00−05:00
US+550737-1313435America/MetlakatlaMetlakatla Time - Annette Island−08:00−08:00
MX+1924-09909America/Mexico_CityCentral Time - most locations−06:00−05:00
PM+4703-05620America/Miquelon−03:00−02:00
CA+4606-06447America/MonctonAtlantic Time - New Brunswick−04:00−03:00
MX+2540-10019America/MonterreyMexican Central Time - Coahuila, Durango, Nuevo Leon, Tamaulipas away from US border−06:00−05:00
UY-3453-05611America/Montevideo−03:00−02:00
CA+4531-07334America/MontrealEastern Time - Quebec - most locations−05:00−04:00
MS+1643-06213America/Montserrat−04:00−04:00
BS+2505-07721America/Nassau−05:00−04:00
US+404251-0740023America/New_YorkEastern Time−05:00−04:00
CA+4901-08816America/NipigonEastern Time - Ontario & Quebec - places that did not observe DST 1967-1973−05:00−04:00
US+643004-1652423America/NomeAlaska Time - west Alaska−09:00−08:00
BR-0351-03225America/NoronhaAtlantic islands−02:00−02:00
US+471551-1014640America/North_Dakota/BeulahCentral Time - North Dakota - Mercer County−06:00−05:00
US+470659-1011757America/North_Dakota/CenterCentral Time - North Dakota - Oliver County−06:00−05:00
US+465042-1012439America/North_Dakota/New_SalemCentral Time - North Dakota - Morton County (except Mandan area)−06:00−05:00
MX+2934-10425America/OjinagaUS Mountain Time - Chihuahua near US border−07:00−06:00
PA+0858-07932America/Panama−05:00−05:00
CA+6608-06544America/PangnirtungEastern Time - Pangnirtung, Nunavut−05:00−04:00
SR+0550-05510America/Paramaribo−03:00−03:00
US+332654-1120424America/PhoenixMountain Standard Time - Arizona−07:00−07:00
TT+1039-06131America/Port_of_Spain−04:00−04:00
HT+1832-07220America/Port-au-Prince−05:00−04:00
America/Porto_Acre−04:00−04:00Link to America/Rio_Branco
BR-0846-06354America/Porto_VelhoRondonia−04:00−04:00
PR+182806-0660622America/Puerto_Rico−04:00−04:00
CA+4843-09434America/Rainy_RiverCentral Time - Rainy River & Fort Frances, Ontario−06:00−05:00
CA+624900-0920459America/Rankin_InletCentral Time - central Nunavut−06:00−05:00
BR-0803-03454America/RecifePernambuco−03:00−03:00
CA+5024-10439America/ReginaCentral Standard Time - Saskatchewan - most locations−06:00−06:00
CA+744144-0944945America/ResoluteCentral Standard Time - Resolute, Nunavut−06:00−05:00
BR-0958-06748America/Rio_BrancoAcre−04:00−04:00
America/Rosario−03:00−03:00Link toAmerica/Argentina/Cordoba
MX+3018-11452America/Santa_IsabelMexican Pacific Time - Baja California away from US border−08:00−07:00
BR-0226-05452America/SantaremW Para−03:00−03:00
CL-3327-07040America/Santiagomost locations−04:00−03:00
DO+1828-06954America/Santo_Domingo−04:00−04:00
BR-2332-04637America/Sao_PauloS & SE Brazil (GO, DF, MG, ES, RJ, SP, PR, SC, RS)−03:00−02:00
GL+7029-02158America/ScoresbysundScoresbysund / Ittoqqortoormiit−01:00+00:00
US+364708-1084111America/ShiprockMountain Time - Navajo−07:00−06:00Link to America/Denver
US+571035-1351807America/SitkaAlaska Time - southeast Alaska panhandle−09:00−08:00
BL+1753-06251America/St_Barthelemy−04:00−04:00Link to America/Guadeloupe
CA+4734-05243America/St_JohnsNewfoundland Time, including SE Labrador−03:30−02:30
KN+1718-06243America/St_Kitts−04:00−04:00
LC+1401-06100America/St_Lucia−04:00−04:00
VI+1821-06456America/St_Thomas−04:00−04:00
VC+1309-06114America/St_Vincent−04:00−04:00
CA+5017-10750America/Swift_CurrentCentral Standard Time - Saskatchewan - midwest−06:00−06:00
HN+1406-08713America/Tegucigalpa−06:00−06:00
GL+7634-06847America/ThuleThule / Pituffik−04:00−03:00
CA+4823-08915America/Thunder_BayEastern Time - Thunder Bay, Ontario−05:00−04:00
MX+3232-11701America/TijuanaUS Pacific Time - Baja California near US border−08:00−07:00
CA+4339-07923America/TorontoEastern Time - Ontario - most locations−05:00−04:00
VG+1827-06437America/Tortola−04:00−04:00
CA+4916-12307America/VancouverPacific Time - west British Columbia−08:00−07:00
America/Virgin−04:00−04:00Link to America/St_Thomas
CA+6043-13503America/WhitehorsePacific Time - south Yukon−08:00−07:00
CA+4953-09709America/WinnipegCentral Time - Manitoba & west Ontario−06:00−05:00
US+593249-1394338America/YakutatAlaska Time - Alaska panhandle neck−09:00−08:00
CA+6227-11421America/YellowknifeMountain Time - central Northwest Territories−07:00−06:00
AQ-6617+11031Antarctica/CaseyCasey Station, Bailey Peninsula+11:00+08:00
AQ-6835+07758Antarctica/DavisDavis Station, Vestfold Hills+05:00+07:00
AQ-6640+14001Antarctica/DumontDUrvilleDumont-d'Urville Station, Terre Adelie+10:00+10:00
AQ-5430+15857Antarctica/MacquarieMacquarie Island Station, Macquarie Island+11:00+11:00
AQ-6736+06253Antarctica/MawsonMawson Station, Holme Bay+05:00+05:00
AQ-7750+16636Antarctica/McMurdoMcMurdo Station, Ross Island+12:00+13:00
AQ-6448-06406Antarctica/PalmerPalmer Station, Anvers Island−04:00−03:00
AQ-6734-06808Antarctica/RotheraRothera Station, Adelaide Island−03:00−03:00
AQ-9000+00000Antarctica/South_PoleAmundsen-Scott Station, South Pole+12:00+13:00Link to Antarctica/McMurdo
AQ-690022+0393524Antarctica/SyowaSyowa Station, E Ongul I+03:00+03:00
AQ-7824+10654Antarctica/VostokVostok Station, Lake Vostok+06:00+06:00
SJ+7800+01600Arctic/Longyearbyen+01:00+02:00Link to Europe/Oslo
YE+1245+04512Asia/Aden+03:00+03:00
KZ+4315+07657Asia/Almatymost locations+06:00+06:00
JO+3157+03556Asia/Amman+02:00+03:00
RU+6445+17729Asia/AnadyrMoscow+08 - Bering Sea+12:00+12:00
KZ+4431+05016Asia/AqtauAtyrau (Atirau, Gur'yev), Mangghystau (Mankistau)+05:00+05:00
KZ+5017+05710Asia/AqtobeAqtobe (Aktobe)+05:00+05:00
TM+3757+05823Asia/Ashgabat+05:00+05:00
Asia/Ashkhabad+05:00+05:00Link to Asia/Ashgabat
IQ+3321+04425Asia/Baghdad+03:00+03:00
BH+2623+05035Asia/Bahrain+03:00+03:00
AZ+4023+04951Asia/Baku+04:00+05:00
TH+1345+10031Asia/Bangkok+07:00+07:00
LB+3353+03530Asia/Beirut+02:00+03:00
KG+4254+07436Asia/Bishkek+06:00+06:00
BN+0456+11455Asia/Brunei+08:00+08:00
Asia/Calcutta+05:30+05:30Link to Asia/Kolkata
MN+4804+11430Asia/ChoibalsanDornod, Sukhbaatar+08:00+08:00
CN+2934+10635Asia/Chongqingcentral China - Sichuan, Yunnan, Guangxi, Shaanxi, Guizhou, etc.+08:00+08:00Covering historic Kansu-Szechuan time zone.
Asia/Chungking+08:00+08:00Link to Asia/Chongqing
LK+0656+07951Asia/Colombo+05:30+05:30
Asia/Dacca+06:00+06:00Link to Asia/Dhaka
SY+3330+03618Asia/Damascus+02:00+03:00
BD+2343+09025Asia/Dhaka+06:00+06:00
TL-0833+12535Asia/Dili+09:00+09:00
AE+2518+05518Asia/Dubai+04:00+04:00
TJ+3835+06848Asia/Dushanbe+05:00+05:00
PS+3130+03428Asia/GazaGaza Strip+02:00+03:00
CN+4545+12641Asia/HarbinHeilongjiang (except Mohe), Jilin+08:00+08:00Covering historic Changpai time zone.
PS+313200+0350542Asia/HebronWest Bank+02:00+03:00
VN+1045+10640Asia/Ho_Chi_Minh+07:00+07:00
HK+2217+11409Asia/Hong_Kong+08:00+08:00
MN+4801+09139Asia/HovdBayan-Olgiy, Govi-Altai, Hovd, Uvs, Zavkhan+07:00+07:00
RU+5216+10420Asia/IrkutskMoscow+05 - Lake Baikal+09:00+09:00
Asia/Istanbul+02:00+03:00Link to Europe/Istanbul
ID-0610+10648Asia/JakartaJava & Sumatra+07:00+07:00
ID-0232+14042Asia/Jayapurawest New Guinea (Irian Jaya) & Malukus (Moluccas)+09:00+09:00
IL+3146+03514Asia/Jerusalem+02:00+03:00
AF+3431+06912Asia/Kabul+04:30+04:30
RU+5301+15839Asia/KamchatkaMoscow+08 - Kamchatka+12:00+12:00
PK+2452+06703Asia/Karachi+05:00+05:00
CN+3929+07559Asia/Kashgarwest Tibet & Xinjiang+08:00+08:00Covering historic Kunlun time zone.
NP+2743+08519Asia/Kathmandu+05:45+05:45
Asia/Katmandu+05:45+05:45Link to Asia/Kathmandu
IN+2232+08822Asia/Kolkata+05:30+05:30Note: Different zones in history, see Time in India.
RU+5601+09250Asia/KrasnoyarskMoscow+04 - Yenisei River+08:00+08:00
MY+0310+10142Asia/Kuala_Lumpurpeninsular Malaysia+08:00+08:00
MY+0133+11020Asia/KuchingSabah & Sarawak+08:00+08:00
KW+2920+04759Asia/Kuwait+03:00+03:00
Asia/Macao+08:00+08:00Link to Asia/Macau
MO+2214+11335Asia/Macau+08:00+08:00
RU+5934+15048Asia/MagadanMoscow+08 - Magadan+12:00+12:00
ID-0507+11924Asia/Makassareast & south Borneo, Sulawesi (Celebes), Bali, Nusa Tengarra, west Timor+08:00+08:00
PH+1435+12100Asia/Manila+08:00+08:00
OM+2336+05835Asia/Muscat+04:00+04:00
CY+3510+03322Asia/Nicosia+02:00+03:00
RU+5345+08707Asia/NovokuznetskMoscow+03 - Novokuznetsk+07:00+07:00
RU+5502+08255Asia/NovosibirskMoscow+03 - Novosibirsk+07:00+07:00
RU+5500+07324Asia/OmskMoscow+03 - west Siberia+07:00+07:00
KZ+5113+05121Asia/OralWest Kazakhstan+05:00+05:00
KH+1133+10455Asia/Phnom_Penh+07:00+07:00
ID-0002+10920Asia/Pontianakwest & central Borneo+07:00+07:00
KP+3901+12545Asia/Pyongyang+09:00+09:00
QA+2517+05132Asia/Qatar+03:00+03:00
KZ+4448+06528Asia/QyzylordaQyzylorda (Kyzylorda, Kzyl-Orda)+06:00+06:00
MM+1647+09610Asia/Rangoon+06:30+06:30
SA+2438+04643Asia/Riyadh+03:00+03:00
Asia/Saigon+07:00+07:00Link to Asia/Ho_Chi_Minh
RU+4658+14242Asia/SakhalinMoscow+07 - Sakhalin Island+11:00+11:00
UZ+3940+06648Asia/Samarkandwest Uzbekistan+05:00+05:00
KR+3733+12658Asia/Seoul+09:00+09:00
CN+3114+12128Asia/Shanghaieast China - Beijing, Guangdong, Shanghai, etc.+08:00+08:00Covering historic Chungyuan time zone.
SG+0117+10351Asia/Singapore+08:00+08:00
TW+2503+12130Asia/Taipei+08:00+08:00
UZ+4120+06918Asia/Tashkenteast Uzbekistan+05:00+05:00
GE+4143+04449Asia/Tbilisi+04:00+04:00
IR+3540+05126Asia/Tehran+03:30+04:30
Asia/Tel_Aviv+02:00+03:00Link to Asia/Jerusalem
Asia/Thimbu+06:00+06:00Link to Asia/Thimphu
BT+2728+08939Asia/Thimphu+06:00+06:00
JP+353916+1394441Asia/Tokyo+09:00+09:00
Asia/Ujung_Pandang+08:00+08:00Link to Asia/Makassar
MN+4755+10653Asia/Ulaanbaatarmost locations+08:00+08:00
Asia/Ulan_Bator+08:00+08:00Link to Asia/Ulaanbaatar
CN+4348+08735Asia/Urumqimost of Tibet & Xinjiang+08:00+08:00Covering historic Sinkiang-Tibettime zone.
LA+1758+10236Asia/Vientiane+07:00+07:00
RU+4310+13156Asia/VladivostokMoscow+07 - Amur River+11:00+11:00
RU+6200+12940Asia/YakutskMoscow+06 - Lena River+10:00+10:00
RU+5651+06036Asia/YekaterinburgMoscow+02 - Urals+06:00+06:00
AM+4011+04430Asia/Yerevan+04:00+04:00
PT+3744-02540Atlantic/AzoresAzores−01:00+00:00
BM+3217-06446Atlantic/Bermuda−04:00−03:00
ES+2806-01524Atlantic/CanaryCanary Islands+00:00+01:00
CV+1455-02331Atlantic/Cape_Verde−01:00−01:00
Atlantic/Faeroe+00:00+01:00Link to Atlantic/Faroe
FO+6201-00646Atlantic/Faroe+00:00+01:00
Atlantic/Jan_Mayen+01:00+02:00Link to Europe/Oslo
PT+3238-01654Atlantic/MadeiraMadeira Islands+00:00+01:00
IS+6409-02151Atlantic/Reykjavik+00:00+00:00
GS-5416-03632Atlantic/South_Georgia−02:00−02:00
SH-1555-00542Atlantic/St_Helena+00:00+00:00
FK-5142-05751Atlantic/Stanley−03:00−03:00
Australia/ACT+10:00+11:00Link to Australia/Sydney
AU-3455+13835Australia/AdelaideSouth Australia+09:30+10:30
AU-2728+15302Australia/BrisbaneQueensland - most locations+10:00+10:00
AU-3157+14127Australia/Broken_HillNew South Wales - Yancowinna+09:30+10:30
Australia/Canberra+10:00+11:00Link to Australia/Sydney
AU-3956+14352Australia/CurrieTasmania - King Island+10:00+11:00
AU-1228+13050Australia/DarwinNorthern Territory+09:30+09:30
AU-3143+12852Australia/EuclaWestern Australia - Eucla area+08:45+08:45
AU-4253+14719Australia/HobartTasmania - most locations+10:00+11:00
Australia/LHI+10:30+11:00Link to Australia/Lord_Howe
AU-2016+14900Australia/LindemanQueensland - Holiday Islands+10:00+10:00
AU-3133+15905Australia/Lord_HoweLord Howe Island+10:30+11:00
AU-3749+14458Australia/MelbourneVictoria+10:00+11:00
Australia/North+09:30+09:30Link to Australia/Darwin
Australia/NSW+10:00+11:00Link to Australia/Sydney
AU-3157+11551Australia/PerthWestern Australia - most locations+08:00+08:00
Australia/Queensland+10:00+10:00Link to Australia/Brisbane
Australia/South+09:30+10:30Link to Australia/Adelaide
AU-3352+15113Australia/SydneyNew South Wales - most locations+10:00+11:00
Australia/Tasmania+10:00+11:00Link to Australia/Hobart
Australia/Victoria+10:00+11:00Link to Australia/Melbourne
Australia/West+08:00+08:00Link to Australia/Perth
Australia/Yancowinna+09:30+10:30Link to Australia/Broken_Hill
Brazil/Acre−04:00−04:00Link to America/Rio_Branco
Brazil/DeNoronha−02:00−02:00Link to America/Noronha
Brazil/East−03:00−02:00Link to America/Sao_Paulo
Brazil/West−04:00−04:00Link to America/Manaus
Canada/Atlantic−04:00−03:00Link to America/Halifax
Canada/Central−06:00−05:00Link to America/Winnipeg
Canada/Eastern−05:00−04:00Link to America/Toronto
Canada/East-Saskatchewan−06:00−06:00Link to America/Regina
Canada/Mountain−07:00−06:00Link to America/Edmonton
Canada/Newfoundland−03:30−02:30Link to America/St_Johns
Canada/Pacific−08:00−07:00Link to America/Vancouver
Canada/Saskatchewan−06:00−06:00Link to America/Regina
Canada/Yukon−08:00−07:00Link to America/Whitehorse
CET+01:00+02:00
Chile/Continental−04:00−03:00Link to America/Santiago
Chile/EasterIsland−06:00−05:00Link to Pacific/Easter
CST6CDT−06:00−05:00
Cuba−05:00−04:00Link to America/Havana
EET+02:00+03:00
Egypt+02:00+02:00Link to Africa/Cairo
Eire+00:00+01:00Link to Europe/Dublin
EST−05:00−05:00
EST5EDT−05:00−04:00
Etc/GMT+00:00+00:00Link to UTC
Etc/GMT+0+00:00+00:00Link to UTC
Etc/UCT+00:00+00:00Link to UTC
Etc/Universal+00:00+00:00Link to UTC
Etc/UTC+00:00+00:00Link to UTC
Etc/Zulu+00:00+00:00Link to UTC
NL+5222+00454Europe/Amsterdam+01:00+02:00
AD+4230+00131Europe/Andorra+01:00+02:00
GR+3758+02343Europe/Athens+02:00+03:00
Europe/Belfast+00:00+01:00Link to Europe/London
RS+4450+02030Europe/Belgrade+01:00+02:00
DE+5230+01322Europe/Berlin+01:00+02:00In 1945, the Trizone did not follow Berlin's switch to DST, see Time in Germany
SK+4809+01707Europe/Bratislava+01:00+02:00Link to Europe/Prague
BE+5050+00420Europe/Brussels+01:00+02:00
RO+4426+02606Europe/Bucharest+02:00+03:00
HU+4730+01905Europe/Budapest+01:00+02:00
MD+4700+02850Europe/Chisinau+02:00+03:00
DK+5540+01235Europe/Copenhagen+01:00+02:00
IE+5320-00615Europe/Dublin+00:00+01:00
GI+3608-00521Europe/Gibraltar+01:00+02:00
GG+4927-00232Europe/Guernsey+00:00+01:00Link to Europe/London
FI+6010+02458Europe/Helsinki+02:00+03:00
IM+5409-00428Europe/Isle_of_Man+00:00+01:00Link to Europe/London
TR+4101+02858Europe/Istanbul+02:00+03:00
JE+4912-00207Europe/Jersey+00:00+01:00Link to Europe/London
RU+5443+02030Europe/KaliningradMoscow-01 - Kaliningrad+03:00+03:00
UA+5026+03031Europe/Kievmost locations+02:00+03:00
PT+3843-00908Europe/Lisbonmainland+00:00+01:00
SI+4603+01431Europe/Ljubljana+01:00+02:00Link to Europe/Belgrade
GB+513030-0000731Europe/London+00:00+01:00
LU+4936+00609Europe/Luxembourg+01:00+02:00
ES+4024-00341Europe/Madridmainland+01:00+02:00
MT+3554+01431Europe/Malta+01:00+02:00
AX+6006+01957Europe/Mariehamn+02:00+03:00Link to Europe/Helsinki
BY+5354+02734Europe/Minsk+03:00+03:00
MC+4342+00723Europe/Monaco+01:00+02:00
RU+5545+03735Europe/MoscowMoscow+00 - west Russia+04:00+04:00
Europe/Nicosia+02:00+03:00Link to Asia/Nicosia
NO+5955+01045Europe/Oslo+01:00+02:00
FR+4852+00220Europe/Paris+01:00+02:00
ME+4226+01916Europe/Podgorica+01:00+02:00Link to Europe/Belgrade
CZ+5005+01426Europe/Prague+01:00+02:00
LV+5657+02406Europe/Riga+02:00+03:00
IT+4154+01229Europe/Rome+01:00+02:00
RU+5312+05009Europe/SamaraMoscow+00 - Samara, Udmurtia+04:00+04:00
SM+4355+01228Europe/San_Marino+01:00+02:00Link to Europe/Rome
BA+4352+01825Europe/Sarajevo+01:00+02:00Link to Europe/Belgrade
UA+4457+03406Europe/Simferopolcentral Crimea+02:00+03:00
MK+4159+02126Europe/Skopje+01:00+02:00Link to Europe/Belgrade
BG+4241+02319Europe/Sofia+02:00+03:00
SE+5920+01803Europe/Stockholm+01:00+02:00
EE+5925+02445Europe/Tallinn+02:00+03:00
AL+4120+01950Europe/Tirane+01:00+02:00
Europe/Tiraspol+02:00+03:00Link to Europe/Chisinau
UA+4837+02218Europe/UzhgorodRuthenia+02:00+03:00
LI+4709+00931Europe/Vaduz+01:00+02:00
VA+415408+0122711Europe/Vatican+01:00+02:00Link to Europe/Rome
AT+4813+01620Europe/Vienna+01:00+02:00
LT+5441+02519Europe/Vilnius+02:00+03:00
RU+4844+04425Europe/VolgogradMoscow+00 - Caspian Sea+04:00+04:00
PL+5215+02100Europe/Warsaw+01:00+02:00
HR+4548+01558Europe/Zagreb+01:00+02:00Link to Europe/Belgrade
UA+4750+03510Europe/ZaporozhyeZaporozh'ye, E Lugansk / Zaporizhia, E Luhansk+02:00+03:00
CH+4723+00832Europe/Zurich+01:00+02:00
GB+00:00+01:00Link to Europe/London
GB-Eire+00:00+01:00Link to Europe/London
GMT+00:00+00:00Link to UTC
GMT+0+00:00+00:00Link to UTC
GMT0+00:00+00:00Link to UTC
GMT-0+00:00+00:00Link to UTC
Greenwich+00:00+00:00Link to UTC
Hongkong+08:00+08:00Link to Asia/Hong_Kong
HST−10:00−10:00
Iceland+00:00+00:00Link to Atlantic/Reykjavik
MG-1855+04731Indian/Antananarivo+03:00+03:00
IO-0720+07225Indian/Chagos+06:00+06:00
CX-1025+10543Indian/Christmas+07:00+07:00
CC-1210+09655Indian/Cocos+06:30+06:30
KM-1141+04316Indian/Comoro+03:00+03:00
TF-492110+0701303Indian/Kerguelen+05:00+05:00
SC-0440+05528Indian/Mahe+04:00+04:00
MV+0410+07330Indian/Maldives+05:00+05:00
MU-2010+05730Indian/Mauritius+04:00+04:00
YT-1247+04514Indian/Mayotte+03:00+03:00
RE-2052+05528Indian/Reunion+04:00+04:00
Iran+03:30+04:30Link to Asia/Tehran
Israel+02:00+03:00Link to Asia/Jerusalem
Jamaica−05:00−05:00Link to America/Jamaica
Japan+09:00+09:00Link to Asia/Tokyo
JST-9+09:00+09:00Link to Asia/Tokyo
Kwajalein+12:00+12:00Link to Pacific/Kwajalein
Libya+02:00+02:00Link to Africa/Tripoli
MET+01:00+02:00
Mexico/BajaNorte−08:00−07:00Link to America/Tijuana
Mexico/BajaSur−07:00−06:00Link to America/Mazatlan
Mexico/General−06:00−05:00Link to America/Mexico_City
MST−07:00−07:00
MST7MDT−07:00−06:00
Navajo−07:00−06:00Link to America/Denver
NZ+12:00+13:00Link to Pacific/Auckland
NZ-CHAT+12:45+13:45Link to Pacific/Chatham
WS-1350-17144Pacific/Apia+13:00+14:00
NZ-3652+17446Pacific/Aucklandmost locations+12:00+13:00
NZ-4357-17633Pacific/ChathamChatham Islands+12:45+13:45
FM+0725+15147Pacific/ChuukChuuk (Truk) and Yap+10:00+10:00
CL-2709-10926Pacific/EasterEaster Island & Sala y Gomez−06:00−05:00
VU-1740+16825Pacific/Efate+11:00+11:00
KI-0308-17105Pacific/EnderburyPhoenix Islands+13:00+13:00
TK-0922-17114Pacific/Fakaofo+13:00+13:00
FJ-1808+17825Pacific/Fiji+12:00+13:00
TV-0831+17913Pacific/Funafuti+12:00+12:00
EC-0054-08936Pacific/GalapagosGalapagos Islands−06:00−06:00
PF-2308-13457Pacific/GambierGambier Islands−09:00−09:00
SB-0932+16012Pacific/Guadalcanal+11:00+11:00
GU+1328+14445Pacific/Guam+10:00+10:00
US+211825-1575130Pacific/HonoluluHawaii−10:00−10:00
UM+1645-16931Pacific/JohnstonJohnston Atoll−10:00−10:00
KI+0152-15720Pacific/KiritimatiLine Islands+14:00+14:00
FM+0519+16259Pacific/KosraeKosrae+11:00+11:00
MH+0905+16720Pacific/KwajaleinKwajalein+12:00+12:00
MH+0709+17112Pacific/Majuromost locations+12:00+12:00
PF-0900-13930Pacific/MarquesasMarquesas Islands−09:30−09:30
UM+2813-17722Pacific/MidwayMidway Islands−11:00−11:00
NR-0031+16655Pacific/Nauru+12:00+12:00
NU-1901-16955Pacific/Niue−11:00−11:00
NF-2903+16758Pacific/Norfolk+11:30+11:30
NC-2216+16627Pacific/Noumea+11:00+11:00
AS-1416-17042Pacific/Pago_Pago−11:00−11:00
PW+0720+13429Pacific/Palau+09:00+09:00
PN-2504-13005Pacific/Pitcairn−08:00−08:00
FM+0658+15813Pacific/PohnpeiPohnpei (Ponape)+11:00+11:00
Pacific/Ponape+11:00+11:00Link to Pacific/Pohnpei
PG-0930+14710Pacific/Port_Moresby+10:00+10:00
CK-2114-15946Pacific/Rarotonga−10:00−10:00
MP+1512+14545Pacific/Saipan+10:00+10:00
Pacific/Samoa−11:00−11:00Link to Pacific/Pago_Pago
PF-1732-14934Pacific/TahitiSociety Islands−10:00−10:00
KI+0125+17300Pacific/TarawaGilbert Islands+12:00+12:00
TO-2110-17510Pacific/Tongatapu+13:00+13:00
Pacific/Truk+10:00+10:00Link to Pacific/Chuuk
UM+1917+16637Pacific/WakeWake Island+12:00+12:00
WF-1318-17610Pacific/Wallis+12:00+12:00
Pacific/Yap+10:00+10:00Link to Pacific/Chuuk
Poland+01:00+02:00Link to Europe/Warsaw
Portugal+00:00+01:00Link to Europe/Lisbon
PRC+08:00+08:00Link to Asia/Shanghai
PST8PDT−08:00−07:00
ROC+08:00+08:00Link to Asia/Taipei
ROK+09:00+09:00Link to Asia/Seoul
Singapore+08:00+08:00Link to Asia/Singapore
Turkey+02:00+03:00Link to Europe/Istanbul
UCT+00:00+00:00Link to UTC
Universal+00:00+00:00Link to UTC
US/Alaska−09:00−08:00Link to America/Anchorage
US/Aleutian−10:00−09:00Link to America/Adak
US/Arizona−07:00−07:00Link to America/Phoenix
US/Central−06:00−05:00Link to America/Chicago
US/Eastern−05:00−04:00Link to America/New_York
US/East-Indiana−05:00−04:00Link toAmerica/Indiana/Indianapolis
US/Hawaii−10:00−10:00Link to Pacific/Honolulu
US/Indiana-Starke−06:00−05:00Link to America/Indiana/Knox
US/Michigan−05:00−04:00Link to America/Detroit
US/Mountain−07:00−06:00Link to America/Denver
US/Pacific−08:00−07:00Link to America/Los_Angeles
US/Pacific-New−08:00−07:00Link to America/Los_Angeles
US/Samoa−11:00−11:00Link to Pacific/Pago_Pago
UTC+00:00+00:00
WET+00:00+01:00
W-SU+04:00+04:00Link to Europe/Moscow
Zulu+00:00+00:00Link to UTC



Number of zones/links by region
RegionZonesLinksTotal
Africa52254
America14321164
Antarctica10111
Arctic011
Asia771289
Atlantic10212
Australia121123
Europe431558
Indian11011
Pacific38442
Misc127183
Total408140548


Posted by 땡보