Welcome Guest, Not a member yet? Register   Sign In
Wrong Unix_to_human conversion
#1

[eluser]murphy2006[/eluser]
Hello,

I am experiencing a strange problem with my CI app. When I save a date in Unix format into the database it works fine but the problem is with the Unix to Human conversion, it fails on some pages and on some it works perfectly fine, with the same unix timestamp!

The correct date should be: 2008-01-07 23:23
The incorrect date are ALL shown (even if the stamps are different): 2007-12-31 12:56

Does anyone know what is wrong with this?
The code I use for the conversion is the below one. The same code is used on
both working and not working pages.

Code:
<?php echo unix_to_human($details->registered, FALSE, 'eu'); ?>

Please help!

Kind Regards,
Daniel
#2

[eluser]tonanbarbarian[/eluser]
I cannot see how you could be getting this problem unless the timestamps are in fact not the same
#3

[eluser]murphy2006[/eluser]
Well, I am even pasted another unix stamp into the current post and vice versa and I still get the same errornous date. I have tried this locally and on my online server, same problem.

I have checked the code over and over again, both controller and view file and I cannot find the problem.

/Daniel




Theme © iAndrew 2016 - Forum software by © MyBB