---
title: "Discussion on \"C Error Handling: errno\" | Hashnode"
description: "Discussion on \"C Error Handling: errno\". 最近碰到的坑，但查了下發現是基礎概念，整理記錄一下。\n背景: gmtime_r\n他會從傳進去的 time_t 算出年月日、星期、時分秒。這並不是件簡單的事情，除了閏年外，假如考慮進時區的話，還要計入日光節約時間，會需要讀取一些定期更新的檔案。\ngmtime_r 的細節不是這文章的重點，只在這裡大概說一下它的功能。\n使用並且處理\n#include <ctime>\n#include <cstdio>"
url: "https://hashnode.com/posts/c-error-handling-errno/63ca92c56087caaeff2f795a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [C Error Handling: errno](https://notes.mukyu.dev/c-error-handling-errno?utm_source=hashnode&utm_medium=feed)

最近碰到的坑，但查了下發現是基礎概念，整理記錄一下。 背景: gmtime\_r 他會從傳進去的 time\_t 算出年月日、星期、時分秒。這並不是件簡單的事情，除了閏年外，假如考慮進時區的話，還要計入日光節約時間，會需要讀取一些定期更新的檔案。 gmtime\_r 的細節不是這文章的重點，只在這裡大概說一下它的功能。 使用並且處理 #include <ctime> #include <cstdio>

Jan 20, 2023 · 1 min read · notes.mukyu.dev  
Updated Oct 27  
Read the article

-   [#c](https://hashnode.com/tag/c)
-   [#error-handling](https://hashnode.com/tag/error-handling)

## Written by

[Patchouli](https://hashnode.com/@mudream4869)

@mudream4869 · Uohout

  
[View profile](https://hashnode.com/@mudream4869)

工程師帕秋莉~

後端工程師。 不定時張貼一些寫扣時的筆記，有時英文，有時中文。 「如果，我是魔女的話...」

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
