Showing posts with label date. Show all posts
Showing posts with label date. Show all posts

2019-07-12

set time on android console


### display date
# date
Tue Jul 13 19:25:15 GMT 1999

# date +'%D %T'
07/13/99 19:25:00


### set date
# date 07131924
Sat Jul 13 19:24:00 GMT 2019

# date 07131924.45
Sat Jul 13 19:24:45 GMT 2019

# date 071319241999.23
Tue Jul 13 19:24:23 GMT 1999


### help
# date --help
usage: date [-u] [-r FILE] [-d DATE] [+DISPLAY_FORMAT] [-D SET_FORMAT] [SET]

Set/get the current date/time. With no SET shows the current date.

Default SET format is "MMDDhhmm[[CC]YY][.ss]", that's (2 digits each)
month, day, hour (0-23), and minute. Optionally century, year, and second.
Also accepts "@UNIXTIME[.FRACTION]" as seconds since midnight Jan 1 1970.

-d      Show DATE instead of current time (convert date format)
-D      +FORMAT for SET or -d (instead of MMDDhhmm[[CC]YY][.ss])
-r      Use modification time of FILE instead of current date
-u      Use UTC instead of current timezone

+FORMAT specifies display format string using strftime(3) syntax:

%% literal %             %n newline              %t tab
%S seconds (00-60)       %M minute (00-59)       %m month (01-12)
%H hour (0-23)           %I hour (01-12)         %p AM/PM
%y short year (00-99)    %Y year                 %C century
%a short weekday name    %A weekday name         %u day of week (1-7, 1=mon)
%b short month name      %B month name           %Z timezone name
%j day of year (001-366) %d day of month (01-31) %e day of month ( 1-31)
%N nanosec (output only)

%U Week of year (0-53 start sunday)   %W Week of year (0-53 start monday)
%V Week of year (1-53 start monday, week < 4 days not part of this year)

%D = "%m/%d/%y"    %r = "%I : %M : %S %p"   %T = "%H:%M:%S"   %h = "%b"
%x locale date     %X locale time           %c locale date/time


2018-10-12

repo


$ repo init -u <url>
$ repo init -u <url> -b <branch_name>
$ repo init -m <manifest_file>
$ repo init -m <manifest_file> -b <branch_name or commit_id>

$ repo sync
$ repo sync -d

$ repo start <local_branch> --all


# snapshot manifest
$ repo manifest -o <manifest_file> -r
$ repo manifest -o release.xml -r
$ cp release.xml .repo/manifests/release.xml
$ cd .repo/manifests/
@git add, commit & push

# snapshot checkout
$ repo init -m release.xml
$ repo sync -d
@ local branch가 있는 경우, release.xml에 있는 revision으로 checkout 안되는 경우 있음.
@ -d 옵션을 주면, 모든 git repository가 manifest에 정의된 revision으로 checkout(detach) 됨.


# .repo folder에서 remote server 접속 없이 checkout
$ repo sync --local-only


# repo group option
// groups in repo manifest. "pdk", "device", "vendor"
   <project groups="pdk" name="platform/art" path="art" />
$ repo list -g group_name
$ repo list -g group_name -p
$ repo forall -g group_name -c 'git status'


# repo checkout w/ date
$ git rev-list -n 1                --before="2019-04-01 00:00" master
$ git rev-list -n 1 --first-parent --before="2019-04-01 00:00" master
$ git rev-list -n 1 --all          --before="2019-04-01 00:00"

$ git checkout `git rev-list -n 1 --before="2019-04-01 00:00" master`
$ git checkout `git rev-list -n 1 --first-parent --before="2019-04-01 00:00" master`
$ git checkout `git rev-list -n 1 --all --before="2019-04-01 00:00"`

$ repo forall -c 'git checkout `git rev-list -n 1 --before="2019-04-01 00:00" master`'
$ repo forall -c 'git checkout `git rev-list -n 1 --first-parent --before="2019-04-01 00:00" master`'
$ repo forall -c 'git checkout `git rev-list -n 1 --all --before="2019-04-01 00:00"`'