Wrong comment time in unit comments

Home Forums General [ No Support Zone ] Issue log [Only for Mods] Wrong comment time in unit comments

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #12955
    lainme
    Participant
    Hi, Recently I found the comment time shown in unit comments are always "46 years ago". It seems like wplms use get_comment_time() in includes/func.php in line 277 to obtain the time and convert it to unix timestamp. But without parameter, this function will always return the default user format. If the default user format contains translated string, such as "下午 5:30" in my case, the convertion strtotime() fails. It's better to specify the format, such as get_comment_time('G:i')
    #13034
    sandy
    Member
    Can you please check if your Vibe course module plugin is updated to latest version 1.9.9.3. The issue is fixed in the update.
    #13050
    lainme
    Participant
    Yes, all the wplms plugins are up to date. This code is in the wplms theme (wplms/includes/func.php) not in vibe-course-module, and is displayed at the end of every unit (discussions & ask question).
    #13230
    Anshuman Sahu
    Keymaster
    YEs this is an issue in wplms theme as of now  and this will be fixed in the next update of wplms theme . . You can translate it as " %1$s your language text " Keep this part remain same in translation  :%1$s
    #13271
    lainme
    Participant
    This is not a translation issue. The text displayed is already correctly translated in my language as "46年前", which means "46 years ago". The issue is the number "46". Since get_comment_time() without specifying format returns the default user format string containing non-English characters, the function strtotime() return FALSE. Then the variable $time_passed always equal to the time since unix epoch, i.e. "46 years".
    #13401
    Anshuman Sahu
    Keymaster
    Thanking you for reporting this bug . We will get it fixed in the next update of wplms (version 2.0) .
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Wrong comment time in unit comments’ is closed to new replies.