מה זה ממיר חותמת זמן Unix?
A Unix Timestamp Converter converts between Unix timestamps (seconds since epoch) and human-readable date/time formats. Also displays the current Unix time with one click. חיוני for developers working with time data.
מתי להשתמש במחשבון זה
- אתה מ-API שמחזיר Unix timestamps וצריך לקרוא אותם כתאריכים בני אדם
- אתה כותב קוד שמאחסן או משווה תאריכים וצריך להמיר בין פורמט timestamp לפורמט תאריך
- אתה צריך את Unix timestamp הנוכחי עבור רישום לוג, קריאת API או רשומה בבסיס נתונים
- אתה מנתח לוגי שרת שבהם timestamps בפורמט epoch
- אתה רוצה לאמת ש-timestamp בקוד שלך תואם לתאריך ולשעה הנכונים
- אתה עובד עם בסיסי נתונים או מערכות קבצים שמשתמשים ב-Unix timestamps עבור מטא-נתונים של קבצים
שלבים:
- הזן Unix timestamp כדי להמיר אותו לתאריך קריא.
- או הזן תאריך/שעה כדי להמיר אותו ל-Unix timestamp.
- לחץ על כפתור הזמן הנוכחי כדי לקבל את Unix timestamp הנוכחי.
- העתק תוצאות עם כפתור ההעתקה.
נוסחה
Timestamp → Date: new Date(timestamp × 1000)
Date → Timestamp: Math.floor(date.getTime() / 1000)
Unix epoch: January 1, 1970 00:00:00 UTC
Max 32-bit timestamp: January 19, 2038 (03:14:07 UTC)
מקרי שימוש
- דיבאג של תשובות API עם timestamps
- המרת ערכי timestamp בבסיס נתונים
- הגדרת תאריכי תפוגה בקוד
- ניתוח לוגים ופירוש נתונים של סדרות זמניות
יתרונות מרכזיים
- Convert timestamps and dates instantly
- Current Unix time with one click
- Display in both local and UTC time
- Free no sign-up needed
- Process timestamps שליליים untuk dates לפני unix epoch (pre-1970)
- חינם, מיידי, ועובד בדפדפן ללא הרשמה או איסוף נתונים
טיפים מקצועיים
- Always store timestamps in UTC in databases
- Remember that JavaScript's Date.now() returns milliseconds. To get seconds: Math.floor(Date.now() / 1000).
- Use 64-bit integers for timestamp storage
- When debugging unexpected dates, first check whether the timestamp is in seconds or milliseconds — the difference is a factor of 1000.
- For API authentication tokens or signed URLs, compute the expiration timestamp server-side and compare it to the current Unix time to check validity.
טעויות נפוצות שיש להימנע מהן
- Forgetting that JavaScript uses milliseconds (×1000)
- Assuming all APIs use the same timestamp format — some return seconds, others return milliseconds. Always check the API documentation.
- Not considering timezone differences
- Using 32-bit integers for timestamps in new systems
מונחי מפתח מוסברים
- Unix timestamp: Seconds since Jan 1, 1970 UTC
- Epoch: Reference point for time measurement
- UTC: Coordinated Universal Time
- Year 2038 problem: 32-bit integer overflow
- Milliseconds timestamp: 13-digit Unix timestamp onde tiempo se mide en milisegundos en lugar de segundos, usado por JavaScript Date.now() y la mayoría de las APIs modernas
מושגים קשורים
- Unix Epoch: 1 בינואר 1970 00:00:00 UTC, נקודת הפניה שמתוכה נמדדים כל Unix timestamps
- Epoch Time: מערכת לייצוג זמן כמספר שניות שחלפו מ-epoch של Unix
- UTC (זמן אוניברסלי מתואם): התקן הזמן הראשי שכולו העולם מנהל שעונים וזמנים, בלתי תלוי באזורי זמן
- בעיית שנת 2038: התאריך שבו timestamps של 32 סיביות יפעלו overflow, מה שעשוי לגרום למערכות לפרש את התאריך כ-1901
- ISO 8601: תקן בינלאומי לייצוג תאריכים וזמנים (לדוגמה, 2024-06-29T12:00:00Z) כחלופה ל Unix timestamps
דוגמה
1719676800 → 29 ביוני 2024.
פירוש התוצאות שלכם
UTC תמיד. 32-bit: 2038.

