قالب:ساعة/شرح

من أرابيكا، الموسوعة الحرة
اذهب إلى التنقل اذهب إلى البحث

{{ساعة}} يعرض هذا القالب الوقت الحالي في منطقة زمنية محددة مسبقاً، يتم حساب الوقت على أساس التوقيت العالمي المنسق للمنطقة الزمنية المحددة مع الأخذ بعين الاعتبار إذا ما كان التوقيت الصيفي نشط حالياً في المنطقة الزمنية أم لا. يعتمد هذا القالب على وحدة:Time.

وسائط

|<time zone>القيمة الأولى : تحدد المنطقة الزمنية، إذا لم تحدد ستكون تلقائياً UTC.
|df= القيمة الثانية: – تنسيق التاريخ؛ هذه المعلمة تأخذ واحدة من أربع قيم لاحقة، أما غيرها من القيم فيتم تجاهلها:
|df=dmy – يحدد تنسيق التاريخ كالتالي: "يوم شهر سنة".
|df=mdy – يحدد التنسيق "شهر يوم، سنة" وهو التنسيق الافتراضي إذا لم يتم تحديده.
|df=iso – ينتج "التاريخ / الوقت" في شكل مقارب تماماً لتنسيق "أيزو 8601"، (الثواني) يتم إغفالها.
|df=y – يعرض تنسيق التاريخ كما |df=dmy
|dst= – عند تعيينها ل no تؤدي إلى تعطيل حساب التوقيت الصيفي للمنطقة الزمنية، القيم الأخرى يتم تجاهلها. مفيدة لمناطق داخل المنطقة الزمنية التي لا تتقيد التوقيت الصيفي. على سبيل المثال أريزونا.

الاستخدام

عادة، كل ما هو مطلوب هو:

{{time|<TZ>}} حيث أن <TZ> واحدة من اختصارات المناطق الزمنية.
{{ساعة|MST}}
05:54, June 20, 2024 MDT [refresh]

لتغيير تنسيق التاريخ:

{{ساعة|MST|df=y}}
05:54, 20 June 2024 MDT [refresh]
{{ساعة|MST|y}}
05:54, 20 June 2024 MDT [refresh]
{{ساعة|MST|dmy}}
05:54, 20 June 2024 MDT [refresh]
{{ساعة|MST|iso}}
2024-06-20T05:54 MDT [refresh]

المناطق الزمنية المدعومة

قائمة اختصارات المناطق الزمنية المعتمدة حالياً:

  1. ^ أ ب ت Not standard time zones, these are included on a whim of the programmer; AoE is 'Anywhere on Earth', 'IDLE' and 'IDLW' are International Date Line East and West
  2. ^ Irish Standard Time. The abbreviation, IST, is also used for توقيت الهند. Irish Standard Time occurs in the summer. For these reasons, the template uses GMT-IE as the time zone abbreviation for Ireland.
  3. ^ توقيت غرينيتش does not observe daylight saving time. In the United Kingdom GMT is observed in winter but shifts to توقيت صيفي بريطاني. The abbreviation BST is also used by توقيت بنغلاديش. To differentiate year-round GMT from GMT as observed in the UK, use GMT-UK.
  4. ^ سان بيير وميكلون Standard Time
  5. ^ Western Greenland Time

ازاحة UTC

لعرض الوقت بالتوقيت العالمي المنسق كما في منطقة زمنية:

{{ساعة|UTC+03:00}}
2024-06-20T14:54 UTC+03:00 [refresh]

المناطق الزمنية العسكرية / البحرية

To display the time at a particular military or nautical time zone,[1] use the time zone's alpha designation:

{{ساعة|M}}
2024-06-20T23:54 M [refresh]

Some military and nautical time zone designators are extended with an asterisk (*), a dagger (†), or double dagger (‡). When writing this template for designators that are extended with a dagger or double dagger, use '+' and '++' respectively:

{{ساعة|M++}}
2024-06-21T00:39 M‡ [refresh]
{{ساعة|M+}}
2024-06-21T01:54 M† [refresh]

التوقيت الصيفي

Daylight saving time (DST) calculations are automatic for those time zones where it is observed. There are locales that do not observe DST within time zones where it is generally observed. To render the correct time for a non-observant locale, set |dst=no:

{{ساعة|MST|dst=no}}
04:54, June 20, 2024 MST [refresh]time in Arizona
{{ساعة|MST}}
05:54, June 20, 2024 MDT [refresh] – but, time on the محمية نافاجو in Arizona

The opposite case is not supported. For places like قاعدة ثول الجوية in Greenland, which observes US DST rules while WGT observes EU DST rules, a time zone properties table will be needed in Module:Time. See §Adding a new time zone.

رسائل الخطأ

{{ساعة}} can produce several error messages. These are:

{{time}} – unknown timezone – the time zone positional parameter is not one of the supported time zone abbreviations. To resolve this error check the parameter's spelling or add the time zone's properties to the module. See §Adding a new time zone.
{{ساعة}} – error calculating dst timestamps – indicates an internal error because one or more of the following time zone properties is malformed: UTC offset, DST begin or end definition. To resolve this error make sure that the time zone's properties are correct.
{{ساعة}} – incomplete definition for... – indicates an internal error because one or more of the following time zone properties is missing: DST begin or end definition, DST event time, time zone article. To resolve this error supply the missing properties.

Adding a new time zone

{{ساعة}} uses وحدة:Time. In that module, is a table of tables, the data structure that specifies the properties of the individual time zones. A blank time zone properties table has this form:

[''] = {
 abbr = '', 
 dst_abbr = '',
 utc_offset = '',
 df = '',
 dst_begins = '',
 dst_ends = '',
 dst_time = '',
 dst_e_time = '',
 article = ''
},

To add a new time zone to Module:Time, add the appropriate information inside the single quotes. If a property does not apply, leave the quotes empty. The rules for each property are:

[''] – (required) the abbreviation of a time zone's standard time; must be lower case; this is the value that will be used in the template's time zone pararameter
abbr = '' – (required) the abbreviation of a time zone's standard time as it will be rendered by the template
dst_abbr = '' – the abbreviation of a time zone's daylight saving or summer time as it will be rendered by the template
utc_offset = '' – (required) the offset in hours and minutes from ت ع م±00:00؛ has the form: utc_offset = '<sign>hh:mm' where <sign> may be + (optional) or - (required for time zones west of the 0 meridian)
df = '' – one of three keywords dmy, mdy, or iso used to specify date format typically used in the time zone; can be overridden with |df= template parameter
dst_begins = '' – a four word sentence in the form <ordinal> <day name> <in|of> <month name> where:
<ordinal> – any of the words 'first', '1st', 'second', '2nd',... 'fifth', '5th', or 'last'
<day name> – any of the day names 'Sunday', 'Monday', 'Tuesday', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported
<in|of> – either of the words 'in' or 'of'
<month name> – any of the month names 'January', 'February', 'March', etc.; capitalization is not important but otherwise must be spelled correctly; abbreviations not supported
dst_ends = '' – (required if dst_begins is specified) same as dst_begins
dst_time = '' – (required if dst_begins is specified) the time that daylight saving time begins; usually local time; when DST begins at a specified time UTC (European Summer Time for example) use: dst_time = 'hh:mm UTC'; four digits and the colon are required
dst_e_time = '' – the time that daylight saving time ends if different from the time it begins; usually local daylight saving time ; when DST ends at a specified time UTC use: dst_e_time = 'hh:mm UTC'; four digits and the colon are required
article = '' – (required) the title of a Wikipedia article that is appropriate to the timezone; do not include wikimarkup

The table-of-tables is organized east (plus UTC offsets) then west (minus UTC offset), by offset hours, and then alphabetically by time zone positional parameter name.

طالع ايضا

مراجع

  1. ^ "World Time Zone Map". HM Nautical Almanac Office. فبراير 2016.