Announcement

Collapse
No announcement yet.

Better understand dateline fields

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Better understand dateline fields

    I just wanted to find out more on the dateline fields. Looking over the structures they are not setup as dates, but rather integers...

    Any links or info would be great.

    Thanks

  • #2
    The dateline column is in Unix timestamp format, which is the number of seconds since midnight Jan. 1, 1970. You can use this online tool to convert Unix Timestamps to date and time:

    http://www.onlineconversion.com/unix_time.htm
    Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
    Change CKEditor Colors to Match Style (for 4.1.4 and above)

    Steve Machol Photography


    Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


    Comment


    • #3
      Ok,

      But then the calculations are done how? Can you point me to an example in one of teh files or code.

      Thanks

      Comment


      • #4
        Sorry I don't know the code for these calcualtions. Since this involves coding questions, you should ask over at vbulletin.org.
        Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
        Change CKEditor Colors to Match Style (for 4.1.4 and above)

        Steve Machol Photography


        Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


        Comment


        • #5
          Thanks Steve.

          Cheers.

          Comment


          • #6
            If $dateline contains the timestamp, then the actual date and time can be extracted with this PHP code in the vBulletin files:

            Code:
            // DATE
            $date = vbdate($vboptions[dateformat], $dateline);
            // TIME
            $time = vbdate($vboptions[timeformat], $dateline);
            Now $date and $time will contain the the readable date and time.

            That's the general idea anyways. If you need help with your specific code then you should post on www.vbulletin.org.

            Comment


            • #7
              Can you please tell me where I can find the code for the vbdate function? Thanks.
              John Caradimas

              Comment


              • #8
                vbdate is defined in /includes/functions.php

                PHP Code:
                // If vbdate() is called with a $format other than than one in $vboptions[], set $locale to false unless you
                // dynamically set the date() and strftime() formats in the vbdate() call. 
                Search for that, the function is just below it.

                Comment


                • #9
                  Thank you Sir, much appreciated.
                  John Caradimas

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X