vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   int(11) and unix timestamp (https://vborg.vbsupport.ru/showthread.php?t=66857)

Jakeman 07-05-2004 04:40 AM

int(11) and unix timestamp
 
What is the biggest number / date that can be stored in a field of type int(11)? Just curious.

:cheeky:

Dark_Wizard 07-05-2004 11:19 AM

Theoretically the largest would be 99999999999 which would produce the date of: Wed, 16 Nov 5138 09:46:39 UTC

Andreas 07-05-2004 11:21 AM

I somewhat doubt we'll use mySQL in year 5138 ^.^

Dark_Wizard 07-05-2004 11:32 AM

Quote:

Originally Posted by KirbyDE
I somewhat doubt we'll use mySQL in year 5138 ^.^

LOL...agreed. I wonder what it would be like in 5138?

Xenon 07-05-2004 04:53 PM

actually dark wizard is not correct here.

INT datatype is a 32 Bit integer, so if signed, then the biggest value is 2^31 - 1 = 2.147.483.647

the (11) is useless as no int 32 can ahve more than 10 chars.

so to using the calculator gives you '19 Jan 2038' as biggest timestamp.

Modin 07-05-2004 05:37 PM

Yep, that's the "real" y2k scare Xenon :D

though technically a timestamp is of type LONG not INT, INT's are only 16bits while LONG's are 32bits (on most architectures) ;)

Jakeman 07-05-2004 05:38 PM

So I've got some time before I have to worry. :eek:

Xenon 07-05-2004 05:59 PM

Ahh, time flies Jake ;)

@Modin: thechnically LONG is just the short form of LONG INTEGER, so INT is the correct thing here ;)

Dark_Wizard 07-05-2004 06:04 PM

Quote:

Originally Posted by Xenon
actually dark wizard is not correct here.

INT datatype is a 32 Bit integer, so if signed, then the biggest value is 2^31 - 1 = 2.147.483.647

the (11) is useless as no int 32 can ahve more than 10 chars.

so to using the calculator gives you '19 Jan 2038' as biggest timestamp.

Interesting...hey at least I gave it a shot. ;)

Xenon 07-05-2004 06:06 PM

yay ;)

you cannot be correct everytime ;)

even i make mistakes (at least the others say so ^^)


All times are GMT. The time now is 09:57 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01784 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete