Please read and follow the COMMON ISSUES first!
Always add your version information in every new post! Thank you!

Form2Content Forum

Questions and answers for Form2Content, a Joomla CCK.
  1. Dan Phillips
  2. F2C field types
  3. Wednesday, 27 June 2018
  4.  Subscribe via email
J! 3.8.10
f2c 6.17.2
PHP 7.0.28
Template - Yootheme Nano 3

If I save a document submission form rather than save & close, dates entered in f2c date picker fields decrement by one day. The correct date is saved in the database, so save & close works fine, but each time I save a document without closing, I have to reset the date picker to the correct date, because on subsequent saves, it is changed to one day earlier. Any ideas?

Thanks.
Responses (4)
Dan Phillips Accepted Answer Pending Moderation
Thanks. It appears from looking at the code that the time and time zone are always set to 00:00:00 and 00:00 on saving. Is there a way of either:

a) recording the time zone of the server instead of assuming UTC on save, or
b) re-opening a saved form by assuming the server time is UTC?

Cheers,
Dan
  1. one week ago
  2. F2C field types
  3. # 1
Julien Accepted Answer Pending Moderation
Hi Dan,

Thanks for your explanation. I will dive into this problem and will see if I can reproduce it.

best,
Julien
  1. one week ago
  2. F2C field types
  3. # 2
F2C webmaster Accepted Answer Pending Moderation
Hi Dan,

Apologies for the late reaction,h ad a weekend at the beach. I will ask julien to look into this behavior. Your clear explanation will help!

Regards,
Patrick
Please read the F2C documentation before asking questions! Thank you if you've done so ;)
  1. one week ago
  2. F2C field types
  3. # 3
Dan Phillips Accepted Answer Pending Moderation
Further clarification. The date is initially saved as a string such as "2018-07-04T00:00:00+00:00:00" The time and time zone are apparently assumed, possibly because of how javascript interprets the output of the date picker?

Each time the submission form is saved after that, the difference between UTC and the server time is subtracted from or added to the time portion. If the server time is UTC -5, then the field will show 2018-07-03 in the submission form and will be saved as 2018-07-03T19:00:00+00:00:00. By the time the article has been edited and saved five times, it will decrement a further day, to 2018-7-02T23:00:00+00:00:00.

Is there a way to avoid this?
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.