Different times on 1st save

dimoss

Well-Known Member
Hi

I have two date fields in a list:
1. Create date (save the current date/time on creation)
2, Update date (save the current date/time on record update)

The strange is that the two times is different when the record 1st created. Actually they have always 1.30 min difference..o_O
The logic is that they should be identically same. At least in F1.5.x and F3.0.x was ok.

P.S. I always use UTC time in global configuration.

Any ideas?

Thanks!
 
Hi Sophist

Yes, in both date element the time field is set to YES
Both elements are hidden.
Thanks
 
I think I found what the problem is. Somehow the first date (create date) takes the tine when I click to Add the record and not when I click to Save it! That's why the difference fluctuates between the two times. When i click to Save the record, it saves the Update time as it should be.
The problem might me on the 1st date element.
 
I assume create date is "Default to current date"=yes
and update date is "always return todays date"?

I think this is the expected behaviour; default is inserted on form load (and could be modified if the field is visible).
To get exactly what you want would need e.g. an option "return todays date" on new/on edit.

Maybe you can use the timestamp element.
 
Hi Troester

Yes, the setting are exactly as you describe.
I don't want to use the timestamp. It's not a big deal anyway. I just mentioned it because I use the same settings as in F1.5.x and F.2.5.x where the behaviour is different!

I just started to use the F 3.1.x and I explore it..:)

Thanks!
 
Hi Troester

I discovered also that when I have "Default to current date" = Yes and the not enabled the Time selector, then I get the date without the time (i get 00:00 in time) even if I have put Y-m-d H:i in both list and form format.

On the contrary when I have the time selector enabled I get the time two times!!

Also when I have "Default to current date" = No I don't get date and time at all (I get 0000-00-00 00:00) obviously because I don't have set a date eval.

The only way to get the correct date/time is to have "Default to current date" = Yes and put the form format like Y-m-d

I think there is something happen with the date element..

Thanks!
 
I discovered also that when I have "Default to current date" = Yes and the not enabled the Time selector, then I get the date without the time (i get 00:00 in time) even if I have put Y-m-d H:i in both list and form format.
Yup, there was a change in the date element, I've discovered it yesterday, too.
Timeselector = no --> no time, e.g.in the database it's 0:00 or x:00 if store as=local (but there's a bug concerning the date)
so the only meaningfull form format is without time
Also when I have "Default to current date" = No I don't get date and time at all (I get 0000-00-00 00:00).
This seems correct to me: if you don't have a default and don't fill in anything it's empty.
 
Yup, there was a change in the date element, I've discovered it yesterday, too.
Timeselector = no --> no time, e.g.in the database it's 0:00 or x:00 if store as=local (but there's a bug concerning the date)
so the only meaningfull form format is without time

I'll be working on that over the weekend.

This seems correct to me: if you don't have a default and don't fill in anything it's empty.

Agreed.

-- hugh
 
I've had a go at fixing this knarly issue - can we update and check what I've done works for you all?
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top