pub struct Field13C {
pub time: String,
pub utc_offset1: String,
pub utc_offset2: String,
}
Expand description
§Field 13C: Time Indication
§Overview
Field 13C specifies time indication(s) related to the processing of payment instructions in SWIFT MT messages. This field is used to indicate specific timing requirements or constraints for transaction processing, particularly in time-sensitive payment scenarios.
§Format Specification
Format: /8c/4!n1!x4!n
- 8c: Time portion (8 characters: HHMMSS + 2 additional characters)
- 4!n1!x4!n: UTC offset (4 digits + sign + 4 digits, format: ±HHMM)
- 4!n1!x4!n: Second UTC offset (4 digits + sign + 4 digits, format: ±HHMM)
§Structure
/HHMMSS+D/±HHMM/±HHMM
│└─────┘│ │ │ │
│ Time │ │ │ └── Second UTC offset
│ │ │ └──── First UTC offset
│ │ └───────── Time remainder/indicator
│ └─────────── Time (HHMMSS)
└─────────────────── Field delimiter
§Time Codes and Indicators
The time portion consists of:
- HH: Hours (00-23)
- MM: Minutes (00-59)
- SS: Seconds (00-59)
- +D: Additional indicator (varies by usage context)
Common time indicators include:
+0
,+1
,+2
, etc.: Numeric indicators+D
: Day indicator+X
: Special processing indicator
§UTC Offset Format
UTC offsets must follow the format ±HHMM
:
- ±: Plus (+) or minus (-) sign
- HH: Hours offset from UTC (00-14)
- MM: Minutes offset (00-59, typically 00 or 30)
§Usage Context
Field 13C is commonly used in:
- MT103: Single Customer Credit Transfer
- MT202: General Financial Institution Transfer
- MT202COV: Cover for customer credit transfer
§Business Applications
- Cut-off times: Specify latest processing time
- Value dating: Indicate when funds should be available
- Time zone coordination: Handle cross-border payments
- STP processing: Ensure straight-through processing timing
§Examples
:13C:/CLSTIME/153045+1/+0100/-0500
└─── CLS Bank cut-off time at 15:30:45+1, CET (+0100), EST (-0500)
:13C:/RNCTIME/090000+0/+0000/+0900
└─── TARGET receive time at 09:00:00, UTC (+0000), JST (+0900)
:13C:/SNDTIME/235959+D/+0200/-0800
└─── Send time at 23:59:59+D, CEST (+0200), PST (-0800)
§Validation Rules
- Time format: Must be exactly 8 characters (HHMMSS + 2 chars)
- Time values: Hours (00-23), Minutes (00-59), Seconds (00-59)
- UTC offsets: Must be ±HHMM format with valid ranges
- Structure: Must have exactly 3 parts separated by ‘/’
- Leading slash: Field content must start with ‘/’
§Network Validated Rules (SWIFT Standards)
- Time indication must be a valid time expressed as HHMM (Error: T38)
- Sign must be either “+” or “-” (Error: T15)
- Time offset hours must be 00-13, minutes 00-59 (Error: T16)
- Format must comply with SWIFT field specifications
Fields§
§time: String
Time portion (8 characters: HHMMSS + 2 additional characters)
Format: HHMMSS+D where:
- HH: Hours (00-23)
- MM: Minutes (00-59)
- SS: Seconds (00-59)
- +D: Additional indicator (context-dependent)
Examples: “153045+1”, “090000+0”, “235959+D”
utc_offset1: String
First UTC offset (format: ±HHMM)
Represents the UTC offset for the first timezone reference. Format: ±HHMM where:
- ±: Plus (+) or minus (-) sign
- HH: Hours offset from UTC (00-14)
- MM: Minutes offset (00-59, typically 00 or 30)
Examples: “+0100” (CET), “-0500” (EST), “+0000” (UTC)
utc_offset2: String
Second UTC offset (format: ±HHMM)
Represents the UTC offset for the second timezone reference. Used for cross-timezone coordination or dual time indication. Same format as utc_offset1.
Examples: “-0800” (PST), “+0900” (JST), “+0530” (IST)
Implementations§
Source§impl Field13C
impl Field13C
Sourcepub fn new(
time: impl Into<String>,
utc_offset1: impl Into<String>,
utc_offset2: impl Into<String>,
) -> Result<Self>
pub fn new( time: impl Into<String>, utc_offset1: impl Into<String>, utc_offset2: impl Into<String>, ) -> Result<Self>
Create a new Field13C with comprehensive validation
§Arguments
time
- Time portion (8 characters: HHMMSS + 2 additional chars)utc_offset1
- First UTC offset (±HHMM format)utc_offset2
- Second UTC offset (±HHMM format)
§Examples
use swift_mt_message::fields::Field13C;
// CLS Bank cut-off time
let field = Field13C::new("153045+1", "+0100", "-0500").unwrap();
// TARGET processing time
let field = Field13C::new("090000+0", "+0000", "+0900").unwrap();
§Errors
Returns ParseError
if:
- Time is not exactly 8 characters
- Hours, minutes, or seconds are out of valid range
- UTC offsets are not in ±HHMM format
- UTC offset values are out of valid range
Sourcepub fn utc_offset1(&self) -> &str
pub fn utc_offset1(&self) -> &str
Sourcepub fn utc_offset2(&self) -> &str
pub fn utc_offset2(&self) -> &str
Sourcepub fn time_remainder(&self) -> &str
pub fn time_remainder(&self) -> &str
Get the time remainder/indicator
Returns the last 2 characters of the time string, which typically contain additional time indicators or processing codes.
§Returns
The time remainder string (2 characters)
§Example
let field = Field13C::new("153045+1", "+0100", "-0500").unwrap();
assert_eq!(field.time_remainder(), "+1");
Sourcepub fn is_cls_time(&self) -> bool
pub fn is_cls_time(&self) -> bool
Check if this is a CLS Bank time indication
Determines if this field represents a CLS Bank cut-off time based on common patterns and indicators.
§Returns
true
if this appears to be a CLS time indication
Sourcepub fn is_target_time(&self) -> bool
pub fn is_target_time(&self) -> bool
Check if this is a TARGET system time indication
Determines if this field represents a TARGET (Trans-European Automated Real-time Gross Settlement Express Transfer) system time indication.
§Returns
true
if this appears to be a TARGET time indication
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a human-readable description of the time indication
Returns a descriptive string explaining what this time indication represents based on common SWIFT usage patterns.
§Returns
A descriptive string
§Example
let field = Field13C::new("153045+1", "+0100", "-0500").unwrap();
println!("{}", field.description());