sixem / ivfi-php

IVFi is a directory indexer that aims to make it easy to browse and explore web-accessible directories.
https://git.five.sh/ivfi/
Other
108 stars 18 forks source link

Changing date format #11

Closed camjac251 closed 3 years ago

camjac251 commented 4 years ago

Could it be possible to change the date formatting? I had modified it before but I think the javascript overrides the php file's date variables.

I was hoping to set something like this D m/d/y h:i A which would look something like this Sat 07/11/20 09:54 PM

sixem commented 4 years ago

Good idea, and you are right, the JS does override the formatting because of the timezone adjustments. I think this should be fixable though, i just need to find a way to utilize the same date format for both PHP and JS. I'll see what i can do.

sixem commented 4 years ago

I've added a commit to the dev branch. Hopefully it should work now. The date option can now be set to either array('desktop_format', 'mobile_format') or just a regular string if they should both be the same format, i wouldn't recommend this though as the mobile screen space is very limited with these tables.

sixem commented 4 years ago

A date format option has been added. (#13)

camjac251 commented 4 years ago

Sorry for the late reply. I just updated today to the latest version and saw the new variable for adding in the date format. Although I believe the javascript is overriding any php formatting. What happens is on the load of a page, it'll show the format that php defines but then is overridden by JS but not following the format. I'm trying to use m/d/y h:i A I've attached a gif below of what happens on reloading the page 2020-08-22_13-45-37

sixem commented 4 years ago

That's weird. Can you double check that you've updated all of the files? This used to be the issue before the latest release but it should be resolved now.

I tried using the same format as you and i can't reproduce it when reloading the page.

VG5L