fire hd 8 - how to set time in terminal - Fire HD 8 and HD 10 Q&A, Help & Troubleshooting

has anyone with luck on changing the time of the hd 8 in terminal?
when i try to, it just saids bad date:
karnak:/ # date -d "23 MAY 2019 11:55:00" SET
date: bad date '23 MAY 2019 11:55:00'
or, it just display the current time and does nothing:
karnak:/ # date +%T "11:55:00"
11:52:08
karnak:/ # date +%T "11:55:00" SET
11:52:12

date -s YYYYMMDD.HHmmss

i already google the command and try a dozen of commands:
karnak:/ # date -s 20190523.15:23:01
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
date: Unknown option s

date MMDDhhmmYYYY.ss
date 123123592019.59
= 2019-12-31 23:59:59

That's possible to change the time in your PC with ADB: https://stackoverflow.com/questions/19496907/set-date-time-using-adb-shell

Related

Calendar - Changing working-week days and hours

This registry hack probably applies to other models as well as the Universal.
By default, the working-week Days and Hours shown in Pocket Outlook by a different colour are set to Monday through Friday and 08:00 to 17:00-hrs. I needed a modification for a client with a weird working week (Mon, Wed, Fri, Sat) and starting ending times on the half hour. The following hack allows this:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Calendar\ActiveTimes]
"ActiveTimes"=dword:2210003E
If whole key is missing, or as above, sets default of 8:00 to 17:00hrs with working week of Monday through Friday.
Explanation:
A. Starting and Ending times of working week (3rd & 4th bytes of dword value)
Specified as a hex value in left-most two bytes.
Format is: eessxxxx e.g.: 2313xxxx
(ee) Left-most byte is Ending time in half hour units
i.e.: 23-hex = 35d/2 = 17.5 = 17:30hrs
(ss) Right-most byte is Starting time in half hour units
i.e.: 13-hex = 19d/2 = 9.5 = 09:30hrs
So, to set 9:30 to 18:30, Mon through Fri use:
"ActiveTimes"=dword:2313003E
B. Particular Days of Working week (1st byte of dword value)
Specified as a binary value in rightmost byte.
Format is: xSFTWTMS
i.e.: x,Sat,Fri,Thu,Wed,Tue,Mon,Sun
e.g.: default value (3E-hex) is: x0111110 = Fri,Thu,Wed,Tue,Mon
e.g.: use 7E-hex for a 6-day (Mon to Sat) working week: x1111110
e.g.: use 16-hex for 3-day working week (Tue, Thu, Fri): x0110100
Don't know if the leftmost bit is used for anything.
So to set working week of 9:30 to 18:30, Mon to Sat, use:
"ActiveTimes"=dword:2313007E
how i can do if my workday start at 10:00 and ends at 00:00 ?
zpdy said:
how i can do if my workday start at 10:00 and ends at 00:00 ?
Click to expand...
Click to collapse
Okay, you've got me on this one! The best that I can do is 10:00 to 23:30, so you'll have to sweet-talk your boss into letting you leave work half-an-hour early :wink:
Unfortunately, the ending value cannot accept 24:00-hrs, neither can it accept 00:00-hrs; since the ending time must be greater than the starting time. If you try, it reverts to 8:00 to 17:00.
I'm assuming that your working days are Monday to Friday, so for 10:00 to 23:30, you'll need to insert a value of: 2F14003E
How is this calculated?
Well, a starting time of 10:00 = 20 half-hour units, which in hexadecimal notation is 14
The ending time of 23:30 = 47 half-hour units, which in hexadecimal is 2F.
The working days (Monday through Friday) are defined by the byte 3E - as detailed in the first message in this topic.
I have not yet experimented to see if the second byte has any influence on the calendar.
As for the clever **** that wanted different days every other week :shock:, either write your own calendar or apply once of two .REG files as needed. :lol:
Didn't work on mine.

GSM Delay

Hi,
I want to send time critical data over a GSM connection. I establish the
connection with the TAPI interface.
My problem is the very big delay between sending a Byte at device a and
receiving a byte at device b.
I test it in the following way:
* device send one byte and start a counter
* device b receive the byte and send it back
* device a receive the byte and stop the counter
the result:
device a | device b | delay
MDA | ISDN | over 1600 ms
SDA | ISDN | 688 ms
MDA | SDA | 884 ms
SDA | MDA | 1836 ms
SDA | SDA | 869 ms
What's going wrong?
My CSD-type is V.110 transparent
MDA = T-Mobile MDA I = HTC Wallaby (I think)
SDA = T-Mobile SDA I = HTC Tornado
I use the following functions:
* lineGetID(0, 0, hCall, LINECALLSELECT_CALL, lpVarStr, TEXT("comm/datamodem")) ;
* sHandle = *(LPHANDLE)((BYTE*)lpVarStr + lpVarStr->dwStringOffset);
* COMMTIMEOUTS commTimeouts;
GetCommTimeouts (sHandle, &commTimeouts);
commTimeouts.ReadIntervalTimeout = MAXDWORD;
commTimeouts.ReadTotalTimeoutMultiplier = MAXDWORD;
commTimeouts.ReadTotalTimeoutConstant = 2000;
commTimeouts.WriteTotalTimeoutMultiplier = 1;
commTimeouts.WriteTotalTimeoutConstant = 1;
SetCommTimeouts (sHandle, &commTimeouts)
* WriteFile (sHandle, data, tSize, &sent, NULL);
* ReadFile (sHandle, data, rSize, &tSize, 0);
Thanks a lot
Thomas
for your real problem I have no solution - could be bound to GSM specifics.
Nevertheless Threading is not all that good on Pocket PC's - I get better results when calling Application.DoEvents very often. = they delay could also between OS and Application!
BR
Daniel
You haven't any problem.
Delays you are achieved is relatively normal for CSD GSM communication. At least I have measured approximately same values.
~600-900ms round trip time for "transparent" mode
and
~1000-1500ms for "nontrasparent"
And more - these delays aren't stable - you easily ca achieve 3000 ms as pick value for dalay.
In case of "nontransparent" communication delays usualy are biger and show tendency to growing more often.
Grigory.
I don't see any problem with threading. What do you mean "not all that good". I use threads a lot and found them to be very predictable and in many cases the best way to get a result. When using writefile with tapi or communicating over sockes I have found no noticeable delay between my application and the os. As long as the threads are synchronized propperly and sometimes give up their time slice when not in important code many threads can get along fine in one app.
As for the time taken, 1000ms for a byte is not good - its very poor. I have found this to happen when using writefile with single bytes with the phone handle. Try sending much larger size data and work out what the time is per byte and I think you will see a huge decrease in the time per byte achived. Strangley I have not found the same dellays in using readfile to read single bytes at a time.
I just sent a 13312 byte file with GSMbeam and it took ~24 seconds (after the handshake). Thats 1.8ms per byte (correct me if my math is wrong).
Question was (as I understand) in propagation time of byte - not about bandwidth.
Yes you can send approximately up to 1.1 kbytes per second in "nontrasparent" mode. But the problem is in time byte (right now have been sent) needs to reach "receiver".
Grigory
Hi,
thank you for your answers and sorry for my late reply.
I can't use "Application.DoEvents", because I program in C++ not in C#.
The problem is the delay not the bandwidth. Ok, GSM data have a round trip delay between 500 and 1000ms.
A normal Voice call haven't this delay. Is it possible to use it for data communications? Are there workarounds?
But why is it bigger on a pocket pc?
On MDA (~200 Mhz, HTC Wallaby) and XDAmini (300 Mhz, HTC Magician ?) I have delays over 1000 ms. But not on a 200 Mhz smartphone ( HTC Tornado). The difference are one second and more?
Is this related to any windows parameter?
Thanks
Thomas

Trying to retrieve day and month

I'm running WM5 on a Treo 700wx and I'm trying to make my own little app, using Mortscript, to display the date on the carrier logo field. I've gotten as far as using:
Code:
GetTime dat, "m d, Y"
which will display in the format of
Code:
04 04, 2007
I would like to display the day name and the month name also, so it would look like this...
Code:
Wednesday, April 04, 2007
I figured out how to write the info into the carrier logo field, except I can't figure out how to retrieve and display the day name and month name.
So can I get some help please?
Thank you.
I figured it out. In the current release of Mortscript, the month can only be retrieved in numerical format. The day of week is the same. So I created a routine that will do the following:
if Week = 0 then WeekDay=Sunday
The month is also retrieved by a similar method:
if Month = 1 then MonthName=January
crazie.eddie said:
I'm running WM5 on a Treo 700wx and I'm trying to make my own little app, using Mortscript, to display the date on the carrier logo field. I've gotten as far as using:
Code:
GetTime dat, "m d, Y"
which will display in the format of
Code:
04 04, 2007
I would like to display the day name and the month name also, so it would look like this...
Code:
Wednesday, April 04, 2007
I figured out how to write the info into the carrier logo field, except I can't figure out how to retrieve and display the day name and month name.
So can I get some help please?
Thank you.
Click to expand...
Click to collapse
have you tried GetTime dat, "dddd, MMMM dd, YYYY"

Initial date

Does anyone know how I can change the initial date after a clean boot?
Now it defaults to 9/1/2007 but I want to default it to 1/1/2010.
I have searched RGU files and googled on this.
I use WM 6.5 build 23014 on my iPAQ 214.
Open up nk.exe (S000) in something like IDA disassembler and look for it. I bet there is also something lying on forums
OndraSter said:
Open up nk.exe (S000) in something like IDA disassembler and look for it. I bet there is also something lying on forums
Click to expand...
Click to collapse
I was looking into the imgfs partition, but I will look in the nk.exe
Thanks!
I did find it in S002
It was in lpSystemTime structure format
For anyone who wants to know to change this here some explanation.
lpSystemTime.wYear = 2007 = 0x07d7
lpSystemTime.wMonth = September = 0x0009
lpSystemTime.wDayOfWeek = Saturday = 0x0006
lpSystemTime.wDay = 1 = 0x0001
lpSystemTime.wHour = 12 AM = 0x0000
lpSystemTime.wMinute = 00 = 0x0000
lpSystemTime.wSecond = 00 = 0x0000
lpSystemTime.wMilisecond = 00 = 0x0000
Structure layout of lpSystemTime.
WYear Integer-The current year.
WMonth Integer-The current month. January is 1.
WDayOfWeek Integer-The current day of the week. Sunday is 0.
WDay Integer-The current day of the month.
WHour Integer-The current hour.
wMinute Integer-The current minute.
wSecond Integer-The current second.
wMilliseconds Integer-The current millisecond.

[Q] Dates and SQLite

Im using the java.sql.Date function to generate a Date from a DatePicker. Im having to take off 1900 from the Year after before the Date is generated for some odd reason, but never mind. I presume it's based on years AFTER 1900 and expecting a two digit date to be passed. I wonder how that'll work with the 1800's...
Anyhoo, I've seen the recommendations to use "Calendar" instead, but what I haven't quite figured out, is how you then get the date from the Calendar to format it in a variety of styles.
The simplest thing seems to be
Code:
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
StringDate = sdf.format(date);
Or where I want to format a Date according to the System Locale:
Code:
java.text.DateFormat df = DateFormat.getDateFormat(context);
StringDate = df.getDateInstance().format(Date.valueOf(date));
Are these all the correct ways of formatting dates, or should I be using Calendar?
Thanks
Simon

Categories

Resources