It is currently Thu Jun 22, 2017 1:34 pm



Welcome
Welcome to rfobasic

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. In addition, registered members also see less advertisements. Registration is fast, simple, and absolutely free, so please, join our community today. **You are not required to provide truthful information to any registration questions. Be whomever you wish to be.!


Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 6:57 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
Mog wrote:
You can easily create a function with that data and parse out unnecessary stuff? With knowing the date and time, you could compare it to the epoch or whatever surely...? Plus or minus a minute!î

It is true on MY phone. Else, have I not to parse depending on locales of the device, wich begins to be a bit less easy?

My results of the ls command are formatted as yyyy.mm.dd hh:mm
Is it always so?

_________________
Alain


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 8:30 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1147
Location: From Blighty
Interesting question.

The locale of my device is en_GB. I'm in the UK/British Isles.

The format also is in the form of yyyy-mm-dd hh:mm

This also lead me to find this:-

https://en.m.wikipedia.org/wiki/ISO_8601

I don't know is the answer really... Maybe Android has chosen the yyyy-mm-dd hh:mm way...?

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 9:02 am 
Offline

Joined: Tue Dec 04, 2012 10:50 am
Posts: 659
Location: UK
Mog wrote:
... Maybe Android has chosen the yyyy-mm-dd hh:mm way...?Mog

Surely they would not expect Americans to get used to anything so logical? ;-)

Mike.


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Fri Mar 24, 2017 9:36 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1147
Location: From Blighty
Coincidence! I remember the Breakfast Club, a film from my mis-spent youth and the opening line is  "Saturday, March 24th 1984".

Spooky.

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Sun Apr 02, 2017 10:03 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
In full Linux shells,
ls -l -D
allows us to apply our own format to the date.
It is not implemented on my Lollipop, but perhaps on further versions?

_________________
Alain


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Sun Apr 02, 2017 11:14 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2802
Location: Colorado, U.S.
When I said you could use a system command, I assumed a better implementation of ls than Android's brain-dead shell provides. Sorry about that.

Adding more File commands to get attributes like creation and modification dates should be simple enough. There are two possible complications:
1. Why stop with timestamps? What other file attributes might be useful?
2. Assets are not in a file system. What should be reported? Maybe the APK creation date?

- Marc


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Sun Apr 02, 2017 11:18 am 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2802
Location: Colorado, U.S.
mjcoon wrote:
Mog wrote:
... Maybe Android has chosen the yyyy-mm-dd hh:mm way...?Mog

Surely they would not expect Americans to get used to anything so logical? ;-)

Mike.
I like to think (hope? pretend?) that programmers are more logical than most Americans. I don't know any who voted for Trump.

- Marc


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Sun Apr 02, 2017 11:44 am 
Offline

Joined: Sat Feb 11, 2017 1:40 am
Posts: 68
Location: France
jMarc wrote:
1. Why stop with timestamps? What other file attributes might be useful?

The needed attributes are mainly those used to sort files: type (folder or not), name, size and date. Only still missing is date.

_________________
Alain


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Mon Apr 03, 2017 1:11 am 
Offline
User avatar

Joined: Sat Dec 08, 2012 2:14 am
Posts: 1147
Location: From Blighty
Found this:-

http://stackoverflow.com/questions/1949 ... -adb-shell

Well it looks like you need root anyway , I did try though. With Marshmallow it's 'date'. I get a permission denial directly on my device, via Terminal Emulator.

Code:
[email protected]:/ $ date 040110002039.00
date: bad date '040110002039.00'
[email protected]:/ $ date 040110002037.00
date: cannot set date: Operation not permitted
Wed Apr  1 10:00:00 BST 2037
[email protected]:/ $


I tried to set one in the future 2037 and one passed the next 'millennium bug' in 2038, just said bad date.

Boo Hoo! All my apps will be broken!

Information from the manifest would be good as well as icon information, checksum and name of the app as it appears in the App Drawer.

I think I've just asked too much!

Mog


Report this post
Top
 Profile  
 
 Post subject: Re: Why nothing like a File.time command?
Unread postPosted: Wed Apr 05, 2017 10:59 pm 
Offline

Joined: Wed Oct 03, 2012 9:53 am
Posts: 2802
Location: Colorado, U.S.
I only asked about commands to return file attributes. :) But yes, it would also be useful to have information about both the BASIC! program you are running and the Android app that is running it. Like the Prog.Info Nicolas added, but with even more information.


Report this post
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred