Giter Site home page Giter Site logo

Comments (6)

rmm5t avatar rmm5t commented on June 16, 2024 2

@BoumBam is correct. You must format your time stamp into ISO8601 format for timeago to work. This is pretty standard for any type of library like this.

from jquery-timeago.

BoumBam avatar BoumBam commented on June 16, 2024 1

I used mysql function UTC_TIMESTAMP() to store the dateTime.

like that: 2009-12-01 00:00:00.

from jquery-timeago.

DanielDanielDanielD avatar DanielDanielDanielD commented on June 16, 2024

Hi, I'm now having the exact same problem, have you found any solution to this?

from jquery-timeago.

BoumBam avatar BoumBam commented on June 16, 2024

@DanielDanielDanielD
It is not a problem with jquery-timeago.

It is with php.

Here is how I did:

echo <time class='timeago' datetime='".date(DATE_ISO8601, strtotime($date); )."'></time>;

$date is a DATE_TIME.

Sorry for the late answer

from jquery-timeago.

DanielDanielDanielD avatar DanielDanielDanielD commented on June 16, 2024

Hi, thanks for your reply,

Your answer is still relevant because I have not yet found a solution to the problem.
I am currently working on a solution through moment.js timezone but also without success.

My project was built in a .NET environment but I believe it should not interfere with reading the date and time, can you please tell me in what format your date and time come from the database?

from jquery-timeago.

DanielDanielDanielD avatar DanielDanielDanielD commented on June 16, 2024

Thanks for the help, I just found an answer to this :)

Since in my website the timezone is per content posted on the website and not per user timezone then I had to add to each message on the website a timezone signature in DB, then calculate with the moment.js timezone directory when it is created anywhere according to the customer's timezone.

I got this answer through here: https://stackoverflow.com/q/65461333/7074256

from jquery-timeago.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.