septor / anteup

e107v2: Donation Tracker Plugin
5 stars 4 forks source link

Issue: Plugin Menu Due Date #35

Closed LaocheXe closed 8 years ago

LaocheXe commented 8 years ago

Currently the Due Date is showing: 1498190400

http://tf13arma.com/forum

septor commented 8 years ago

What does the Last Due date show?

I think someone (me, but I'm blaming @Moc because he's not here to defend himself) forgot to convert the date.

Moc commented 8 years ago

Probably me haha.

@septor: use e107::getDate()->convert_date()

See my oweme plugin (bit outdated) for an example.

Moc commented 8 years ago

Now this is really strange. For me, when I change the date in the AnteUp preferences, it saves it to the database as Thursday, 02 Jun, 2016 rather than the UNIX datestamp.

Would this be a bug in e107? Normally, in the admin UI, it should save datestamp fields as the unix datestamp...

And then the question also is, how did @LaocheXe manage to save it as a unix datestamp on his website :smile:

LaocheXe commented 8 years ago

@Moc - well very simple..... Something did it for me with out me knowin lol

septor commented 8 years ago

It uses the datepicker to get the date, and should be stored however the system stores it, as in, however you've selected dates to be displayed in the e107 date settings.

I've saw incorrect dates displayed, but never unix timestamps.

I say again, how does the Last Due Date display?

LaocheXe commented 8 years ago

capture

septor commented 8 years ago

What does it look like in the menu? I would expect it to render correctly in the admin area since it's storing and pulling the same data as any other datepicker field.

BTW, I'm not saying this isn't broken on the front end. I just don't have time to test things and want to make sure I get any date rendering fixed in one swoop.

LaocheXe commented 8 years ago

capture

septor commented 8 years ago

Add {ANTEUP_LASTDUE} to your template.

LaocheXe commented 8 years ago

Still the same

Moc commented 8 years ago

Figured it out. I was running an outdated version of e107. When updated with the latest Github files, AnteUp correctly saves a UNIX timestamp.

Fixes incoming, hold tight! :smile:

Moc commented 8 years ago
septor commented 8 years ago

Thanks, Tijn!