What are some potential pitfalls when using the SEC_TO_TIME function in PHP for time formatting?

When using the SEC_TO_TIME function in PHP for time formatting, one potential pitfall is that it expects the input in seconds, so if you have a time value in a different format (e.g. minutes or hours), you will need to convert it to seconds before passing it to the function. To solve this, you can multiply the time value by the appropriate conversion factor to get it in seconds before using SEC_TO_TIME.

// Convert time value to seconds before using SEC_TO_TIME
$time_in_minutes = 30;
$time_in_seconds = $time_in_minutes * 60;

$formatted_time = SEC_TO_TIME($time_in_seconds);
echo $formatted_time;