-
Notifications
You must be signed in to change notification settings - Fork 166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Datetime Import #576
Comments
We have to make sure that the timezone offset functions right beneath the line 40 code block work after any changes to the way the datetime functon is imported. The need is to have access to the datetime and timezone functions within the datetime library. |
ah understood. we can sync these up then with the timezone changes you are working on then? |
The logic behind it is that artifacts will import those functions in order
to make a timestamp (epoch int, ISO 8601 string, or webkitime float) into a
datatime object in UTC.
Then take another of the imported functions to do the offset and return it
back to the script.
Does that make sense?
…On Thu, Oct 19, 2023 at 10:13 AM James Habben ***@***.***> wrote:
ah understood. we can sync these up then with the timezone changes you are
working on then?
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPCZNS3HTLOLGAGDCDC3YAEYQDAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGA3TSNJSGU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
end goal, i am thinking, is to make a report with an ability to adjust timezone? |
That would be awesome!!!!!!
…On Thu, Oct 19, 2023 at 10:26 AM James Habben ***@***.***> wrote:
end goal, i am thinking, is to make a report with an ability to adjust
timezone?
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC6JHYPCBOBVKI2GZODYAE2ATAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGEYDGNZQGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
wiat! then whats your goal with the timezone stuff? |
The timezones are offset during processing and the report will show the
items offseted as the user selected.
The is no way to change the offsets at the html report level. If you want
to offset all the items to another timezone the user will have to reprocess
everything again.
That is how it works now as we are updating the artifacts to be timezone
aware.
…On Thu, Oct 19, 2023, 10:37 AM James Habben ***@***.***> wrote:
wiat! then whats your goal with the timezone stuff?
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC2WGAFKXZFBYSXTR73YAE3LHAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZRGEZDKNRUHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
oh cool. if every date is timezone aware, then making the report timezone aware would be a great next step. i havent checked out the javascript libs in use just yet, but it should be possible. best case, change a drop down somewhere. worst case, have to click a button after changing it. |
I see a handful of modules using this type of thing in the sqlite query. is there a specific purpose to having this in the query, or could we move this into python code to make converting dates much easier for module devs?
something like this would allow for the module to take the timestamp right out of sqlite untouched and have a simpler query. plus this would return the date as a date object, which we should keep the date in until its ready to be displayed or printed.
|
We need to turn the times coming out of the query into datetime objects in
utc as you know. There is a function that turns them into such and another
function that converts them into the user selected timezone.
They can be found in ilapfuncs close to the top of the script.
…On Sat, Oct 21, 2023, 4:09 PM James Habben ***@***.***> wrote:
I see a handful of modules using this type of thing in the sqlite query.
is there a specific purpose to having this in the query, or could we move
this into python code to make converting dates much easier for module devs?
DATETIME(CREATIONDATE+978307200,'UNIXEPOCH'),
something like this would allow for the module to take the timestamp right
out of sqlite untouched and have a simpler query. plus this would return
the date as a date object, which we should keep the date in until its ready
to be displayed or printed.
def convert_sqlite_epoch(epoch_date):
try:
epoch_start = datetime.datetime(2001, 1, 1)
date_obj = epoch_start + datetime.timedelta(seconds=epoch_date)
return date_obj
except ValueError:
return "Invalid Epoch Date"
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC26DRHWAR3PWN3G2HLYAQTWVAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHEYTCMJVHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Your function can substitute the one that is there. It just needs to work
with the timezone offset function that is called after.
…On Sat, Oct 21, 2023, 5:06 PM Alexis Brignoni ***@***.***> wrote:
We need to turn the times coming out of the query into datetime objects in
utc as you know. There is a function that turns them into such and another
function that converts them into the user selected timezone.
They can be found in ilapfuncs close to the top of the script.
On Sat, Oct 21, 2023, 4:09 PM James Habben ***@***.***>
wrote:
> I see a handful of modules using this type of thing in the sqlite query.
> is there a specific purpose to having this in the query, or could we move
> this into python code to make converting dates much easier for module devs?
>
> DATETIME(CREATIONDATE+978307200,'UNIXEPOCH'),
>
> something like this would allow for the module to take the timestamp
> right out of sqlite untouched and have a simpler query. plus this would
> return the date as a date object, which we should keep the date in until
> its ready to be displayed or printed.
>
> def convert_sqlite_epoch(epoch_date):
> try:
> epoch_start = datetime.datetime(2001, 1, 1)
> date_obj = epoch_start + datetime.timedelta(seconds=epoch_date)
> return date_obj
> except ValueError:
> return "Invalid Epoch Date"
>
> —
> Reply to this email directly, view it on GitHub
> <#576 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AG3DPC26DRHWAR3PWN3G2HLYAQTWVAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHEYTCMJVHE>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
not fully tested, but it should be good to go. not sending PR yet because i want to check it out more. but i think its in good shape. on the case information page, the user can select the timezone and date format to apply to dates that are provided to the report in the correct way. i have done my testing with the apple address book contacts module. it stores the value to local storage, so it will survive between reports and show the same settings for the user. check it out and let me know what you think. https://github.com/JamesHabben/iLEAPP/tree/dynamicreporttimestamps |
they key is passing in a python datetime object to the report data_list, and the code will dynamically detect that and format it in the table accordingly, including providing an ISO format date string for table sorting since a format like m/d/y would completely break sorting. btw, screenshots show m/d/y, but i am a full fledged yyyy/mm/dd card carrying member. |
Wow. Just wow. This is amazing. Way better than what I have been
implementing.
I will give it a go tomorrow. Thank you so much for pushing the project
forward. Again, this is awesome. 👏 👏 👏
…On Sat, Oct 21, 2023, 8:50 PM James Habben ***@***.***> wrote:
they key is passing in a python datetime object to the report data_list,
and the code will dynamically detect that and format it in the table
accordingly, including providing an ISO format date string for table
sorting since a format like m/d/y would completely break sorting. btw,
screenshots show m/d/y, but i am a full fledged yyyy/mm/dd card carrying
member.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC4LTNZKZODLAPK4GHTYARUW5AVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZTHE2TQOBVHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I agree fully with the approach you propose. Here is some historical context on why things look as they do now: One of the reasons the sqlite rows are called by position is that the column names in the report are almost always different from the column names in the table. The data_headers variable keeps track of the report's column names. I have no issue with folks using the table column names or the query return list positions when appending to data_list. Regarding timestamps in sqlite they will not always be epoch ones as you know. Since most contributors' queries return a string timestamp in ISO format for time fields my approach has been to turn that string into a UTC datetime object which I offset with a user provided timezone at the start of processing. I agree fully with your timezone offset approach at the report level. If I understand correctly the main point will be making contributors aware that their timestamps (be it of sqlite origin or not) need to be a datetime objects at UTC timezone when appending to data_list. Btw we should not give the users the option to see the times in anything other than ISO format. Regarding function expansion I am all for it. All these are great improvements, no doubt about it. I don't see the changes having negative impacts anywhere else. If it goes as planed we should do a full version change from 1.18.7 to 2.0. Same with all the other LEAPPs as it is ported. :-D |
dates will be in all kinds of formats, and even sqlite dates could have different epoch points too. that function just helps to clean up the query from those that use the 2001 epoch. if a date has a different epoch, the module dev can make their own function to handle or we can create another function if its common enough. using this row factory doesnt prevent the module dev from using the positional column reference. it just makes working with the column values easier as reading through the code uses "creationtime" instead of row[1]. it helps to prevent coding mistakes by using 2 instead of 3 when its "first" vs "last" type of thing.
yes. this code wont break any of the existing modules that are supplying their date values as strings, but it wont recognize those for the dynamic date. to get the date recognized, the module dev should supply the value in a datetime object at utc. then the javascript will handle the timezone offset in the browser.
lol, be nice to your users. let them have cake and eat it. |
You are spoiling the users! 😂🤣😂🤣
This is really good stuff. All the LEAPPs will benefit from it.
…On Mon, Oct 23, 2023, 8:36 PM James Habben ***@***.***> wrote:
dropped an info icon next to the number with more information that can be
viewed.
[image: image]
<https://user-images.githubusercontent.com/6327329/277513532-1dd725b9-5aa8-4fb1-bb52-bee8a327757f.png>
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC5IXK2MVB24ZQP3KE3YA4ERVAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZWGI3TCNRVGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
let me know what you think in terms of this direction. i dont think it works well with the timezone parameter input, so not sure if you still have some thought on what that might create a result of. |
If you are refering to the timezone_offset parameter we should take it out.
It will suck since I had to put it in so many places but that's OK.
Deleting is faster than putting it in so I can do that easy.
We can merge your improvements and take out the timezone_offset stuff right
after to include the time zone GUI drop down and timezone terminal
argument.
…On Tue, Oct 24, 2023, 12:39 PM James Habben ***@***.***> wrote:
let me know what you think in terms of this direction. i dont think it
works well with the timezone parameter input, so not sure if you still have
some thought on what that might create a result of.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC4NLPCILQOPGAAVU53YA7VL5AVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONZXGYYTQMZSGQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
if you are game for merging this dynamic report stuff in, we can just remove the input parameter for now. leaving the other parts of the code wont break anything and they can be adjusted over time as we update artifact modules. i have only added the dynamic fields to the addressbook module so far. the phonenumber pop up is in my branch already. i think i will add another pop up for dates to include a few things like UTC and tz applied value, week number, maybe even a "this was 2 years and 3 months ago" type of thing. anything else you think would be helpful to see in a datetime pop up? |
put some more updates into my fork getting ready for the pull request.
current edits are pushed to my github fork if you want to check it out. |
We need to make sure these changes don't cause any issues with creating an
executable. It is key that users can generate an exe using a spec file.
…On Thu, Oct 26, 2023, 2:04 PM James Habben ***@***.***> wrote:
put some more updates into my fork getting ready for the pull request.
-
latest is moving all the reporting html, css, js type stuff into a
report_elements folder to separate them from the python code. then
refactoring the report construction to copy all files from that folder into
the destination _elements folder instead of naming each of the objects
in code, it will autodiscover anything in that folder.
-
also put the filename of the module generating each sub-report at the
bottom of the <main> section so its easier to track down which python
module is responsible for the code. future feature is that we can print a
bit more information about that module by reading the data from the
artifact structure. it can either go direct, or can be a small bit of text
with an icon or something and a click that pops something up with more
information about the author, module, description, whatever. was a bit of a
selfish thing since trying to figure out which module put in which report
section and item was not easy. we can remove it if you dont like it.
current edits are pushed to my github fork if you want to check it out.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC3EKXNYZYYFZNR4MG3YBKQY7AVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGU4DSMJVHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
These changes make sense. Will try to test it out tonight. 👍
…On Thu, Oct 26, 2023, 2:04 PM James Habben ***@***.***> wrote:
put some more updates into my fork getting ready for the pull request.
-
latest is moving all the reporting html, css, js type stuff into a
report_elements folder to separate them from the python code. then
refactoring the report construction to copy all files from that folder into
the destination _elements folder instead of naming each of the objects
in code, it will autodiscover anything in that folder.
-
also put the filename of the module generating each sub-report at the
bottom of the <main> section so its easier to track down which python
module is responsible for the code. future feature is that we can print a
bit more information about that module by reading the data from the
artifact structure. it can either go direct, or can be a small bit of text
with an icon or something and a click that pops something up with more
information about the author, module, description, whatever. was a bit of a
selfish thing since trying to figure out which module put in which report
section and item was not easy. we can remove it if you dont like it.
current edits are pushed to my github fork if you want to check it out.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC3EKXNYZYYFZNR4MG3YBKQY7AVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBRGU4DSMJVHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
i think we can adjust the spec file to do a similar thing. not so familiar with those yet, so doing some research |
found a bug in the current spec file while looking, it didnt build as it sits. edited and its now working great. also moved the old:
both spec files adjusted and pushed to my fork |
oh weird. not sure what would be impacting images like that. i dont have an image with viber in it. i hadnt played with the dark mode yet, so i will have to explore that to see what css needs to get applied to these boxes. we can definitely move the display settings cards to somewhere else. any ideas on where? |
Josh's image has artifacts for chats that have images. Viber is not the
only one in the image.
My first idea would be to make a tab like we have for the different logs
but for the report display settings.
…On Thu, Oct 26, 2023, 7:48 PM James Habben ***@***.***> wrote:
oh weird. not sure what would be impacting images like that. i dont have
an image with viber in it.
i hadnt played with the dark mode yet, so i will have to explore that to
see what css needs to get applied to these boxes. we can definitely move
the display settings cards to somewhere else. any ideas on where?
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPCYVHLCK6GEE5544IU3YBLZDFAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBSGA4DCNZZGI>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Will test out tonight! 👏
…On Fri, Oct 27, 2023, 4:23 PM James Habben ***@***.***> wrote:
fixed dark mode, fixed those image display issues, moved settings to a
settings page and put a button at the top for the settings page.
[image: image]
<https://user-images.githubusercontent.com/6327329/278751859-aa6147ca-6090-4689-b1e0-abe4f555f9b3.png>
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPCY2LXJYFKJ4RNVZPQLYBQJ4TAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTGQ3DGNBZHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
The Display Settings page is fantastic. Way better than what I had in mind. Only thing it needs is a way to go back to the report after the selections are made. I like it a lot. The images are back where they should be. Woot!!! |
the back button works to take the user back to the page they were on. otherwise, what do you have in mind to take the user back? the settings are all saved live, so there is no 'save' or 'close' type button. porting to xLEAPP was on my mind the whole time, and it really shouldnt be very hard at all. i have a few things in mind that will make the sync process between xLEAPP version even easier, but tackle one thing at a time. |
Was thinking of having the 🏡 Report Home icon and link show. Take user to
index.html
…On Sat, Oct 28, 2023, 7:57 PM James Habben ***@***.***> wrote:
the back button works to take the user back to the page they were on.
otherwise, what do you have in mind to take the user back? the settings are
all saved live, so there is no 'save' or 'close' type button.
porting to xLEAPP was on my mind the whole time, and it really shouldnt be
very hard at all. i have a few things in mind that will make the sync
process between xLEAPP version even easier, but tackle one thing at a time.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC7BIVUX2CRRBCN2BU3YBWLU7AVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBTHE2DKNBRGA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
i got the side bar back onto the page. was getting an error in the this now brings the nav items back in without marking it active. pushed to my fork. |
I think this looks fantastic. Love the consistency. |
The from today option is pretty sick.
All. Of it is awesome.
…On Wed, Nov 1, 2023, 7:37 PM James Habben ***@***.***> wrote:
got the 'datetime' popover working
[image: image]
<https://user-images.githubusercontent.com/6327329/279825576-1bdedf49-d8af-477c-825e-b843e69f5ef6.png>
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC7K4OERMKG2JMSCCK3YCLMKJAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZHAZTKMRYHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Honestly nothing comes to mind right now. I will say it is looking great.
Folks are going to appreciate it quite a lot.
…On Wed, Nov 1, 2023, 7:48 PM James Habben ***@***.***> wrote:
added a few more but have an empty box. what else you want in there?
[image: image]
<https://user-images.githubusercontent.com/6327329/279826956-3d7da326-acbb-4e8d-81ff-dba10d863bab.png>
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC5NTIYQZIFLXEST2S3YCLNTHAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOBZHA2DGNBXHA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
ive updated all the modules that hit in my backup, except the sms.py. that one is a bit scary lol. def more modules to update, but i dont have data to validate. all the updates are pushed to my fork. let me know what you think and how you wanna go about PR. |
Can you test with Josh Hickman's iOS 15 test image? That's the one we use
as a baseline.
https://thebinaryhick.blog/public_images/
…On Thu, Nov 2, 2023, 8:38 PM James Habben ***@***.***> wrote:
ive updated all the modules that hit in my backup, except the sms.py. that
one is a bit scary lol. def more modules to update, but i dont have data to
validate. all the updates are pushed to my fork. let me know what you think
and how you wanna go about PR.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC4JQK2HS4EOPPBNZA3YCQ4GTAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTOOJRG42DMMRWHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Been thinking how we address the TSV generated files regarding timezone. If we move timezone offsets to the html report then the TSVs will have to be UTC since they are generated at the artifact level. I'm not against it. Just thinking about that as something that will be part of this design approach. |
Ya, and the timeline function. I already adjusted both of those to take in UTC, but there could be a parameter to adjust the TSV out out by timezone and make the adjustment on the TSV only. |
All the modules updated and pushed to my fork |
couple edits pushed. only module left is the SMS stuff. not sure yet how to put this stuff into the threaded representation. |
Will try to test soon. My schedule is pretty complicated the next 2 weeks.
Thanks for all your efforts on this. 🙏
…On Wed, Nov 8, 2023, 12:43 PM James Habben ***@***.***> wrote:
couple edits pushed. only module left is the SMS stuff. not sure yet how
to put this stuff into the threaded representation.
—
Reply to this email directly, view it on GitHub
<#576 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AG3DPC2HF7W4UUKFUWWZBSLYDPAERAVCNFSM6AAAAAA6GG7T5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBSGM3DINZVGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Saw a commit to change the use of datetime import in I. i had updated that as part of syncing cross versions. A, R, V use
datetime.datetime.now()
and I is the only one importing at higher level and usingdatetime.now()
. do you want to move the others to this instead?I:
iLEAPP/scripts/ilapfuncs.py
Line 40 in eb2bfba
A:
https://github.com/abrignoni/ALEAPP/blob/f7243e99c6ccc5ab5148106558461140d7f5dab8/scripts/ilapfuncs.py#L33
R:
https://github.com/abrignoni/RLEAPP/blob/3a62eb369d7203353db4872b6077a6361c07f095/scripts/ilapfuncs.py#L30
V:
https://github.com/abrignoni/VLEAPP/blob/20a066a144c931ccf383a45fb0ce878c9d62ffc6/scripts/ilapfuncs.py#L30
The text was updated successfully, but these errors were encountered: