Can't set date on Android (ADB)
This is 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 these escapes:
%% 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)
%s seconds past the Epoch
%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
pay attention to this
Default SET format is "MMDDhhmm[[CC]YY][.ss]"
then, your command should be
date 0209000017
Cannot run adb shell date `date +%m%d%H%M%Y.%S`
Inside the emulator goto Settings > Date & Time
- Deselect Automatic timezone.
- Adjust your timezone manually.
- Deselect automatic date & time and set correct time
Related Topics
Android: Turn Off Screen When Close to Face
How to Repeat Notification Daily on Specific Time in Android Through Background Service
Remove Animation/Shifting Mode from Bottomnavigationview Android
How to Prevent The Activity from Loading Twice on Pressing The Button
How to Enable Autostart Option for My App in Xiaomi Phone Security App Programmatically in Android
How to Set a Fragment Tag by Code
Android - Creating a New Activity in Eclipse
Adding a Vertical Scrollbar to an Alertdialog in Android
Crop Square Image to Circle - Programmatically
Audio Format for iOS and Android
Android Active Link of Url in Textview
Easier Way to Get View's Id (String) by Its Id (Int)
Android: Is There Any Free PDF Library for Android
Release APK Not Updating with JavaScript Code
Gradle Warning: Variant.Getoutputfile() and Variant.Setoutputfile() Are Deprecated