package helpers

import (
	"os"
	"time"
)

func InLambda() bool {
	if lambdaTaskRoot := os.Getenv("LAMBDA_TASK_ROOT"); lambdaTaskRoot != "" {
		return true
	}
	return false
}

func Datetime(timeString string) (time.Time, error) {
	layout := "2006-01-02T15:04:05.000Z"
	result, err := time.Parse(layout, timeString)
	return result, err
}
